/* ============================================================
   Project Jupiter — Roman Imperial Homepage Stylesheet
   ============================================================ */

:root {
	/* Backgrounds — marble & ivory */
	--bg-marble: #faf8f3;
	--bg-ivory: #f0ebe0;
	--bg-parchment: #e8e0d0;
	--bg-card: #ffffff;
	--bg-hero: #1e1a14;

	/* Imperial colors */
	--imperial-red: #8b1a1a;
	--imperial-red-light: #a52a2a;
	--imperial-red-hover: #6d1414;
	--gold: #c9a84c;
	--gold-bright: #d4a017;
	--gold-dim: #a08838;
	--bronze: #b8860b;
	--laurel: #5c6b3c;
	--laurel-light: #6b7a45;

	/* Tribes */
	--roman: #8b1a1a;
	--teuton: #2a5a8b;
	--gaul: #3a7a3a;

	/* Text */
	--text-dark: #2c2416;
	--text-body: #4a3f2f;
	--text-muted: #8a7e6d;
	--text-light: #a69882;
	--text-on-dark: #e8e0d0;

	/* Borders */
	--border-stone: #c9bfa8;
	--border-light: #ddd5c4;
	--border-gold: #c9a84c;

	/* Fonts */
	--font-display: 'Cinzel Decorative', serif;
	--font-heading: 'Cinzel', serif;
	--font-mono: 'JetBrains Mono', monospace;
	--font-body: 'Cormorant Garamond', serif;

	/* Spacing */
	--section-pad: 80px 20px;
	--container-max: 1100px;
	--radius: 4px;
}


/* === Reset & Base === */

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 1.1rem;
	color: var(--text-body);
	background: var(--bg-marble);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--imperial-red);
	text-decoration: none;
	transition: color 0.2s;
}

a:hover {
	color: var(--imperial-red-light);
}

img {
	max-width: 100%;
	height: auto;
}

.container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 20px;
}


/* === Hero Section === */

.hero {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 40px 20px;
	background:
		linear-gradient(180deg, rgba(30, 26, 20, 0.55) 0%, rgba(30, 26, 20, 0.7) 50%, rgba(30, 26, 20, 0.92) 100%),
		url('../img/hero-bg.png') center center / cover no-repeat;
	position: relative;
}

.hero__laurel {
	font-size: 3rem;
	margin-bottom: 12px;
	display: block;
	opacity: 0.6;
	color: var(--gold);
}

.hero__title {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: clamp(2.4rem, 6vw, 4.5rem);
	color: var(--gold);
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	letter-spacing: 0.08em;
	margin-bottom: 16px;
}

.hero__tagline {
	font-family: var(--font-body);
	font-weight: 400;
	font-size: clamp(1.1rem, 2.5vw, 1.5rem);
	color: var(--text-on-dark);
	margin-bottom: 12px;
	max-width: 600px;
	font-style: italic;
}

.hero__subtitle {
	font-family: var(--font-heading);
	font-weight: 400;
	font-size: 0.9rem;
	color: var(--text-light);
	letter-spacing: 0.15em;
	text-transform: uppercase;
	margin-bottom: 40px;
}

.hero__actions {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	justify-content: center;
}

.btn {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 0.9rem;
	padding: 14px 40px;
	border-radius: var(--radius);
	border: 2px solid var(--gold);
	cursor: pointer;
	transition: all 0.25s ease;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	display: inline-block;
}

.btn--primary {
	background: var(--imperial-red);
	color: var(--gold);
	border-color: var(--gold);
}

.btn--primary:hover {
	background: var(--imperial-red-hover);
	color: var(--gold-bright);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(139, 26, 26, 0.4);
}

.btn--secondary {
	background: transparent;
	color: var(--gold);
}

.btn--secondary:hover {
	background: rgba(201, 168, 76, 0.1);
	color: var(--gold-bright);
	transform: translateY(-2px);
}

/* Used on light backgrounds */
.btn--primary-light {
	background: var(--imperial-red);
	color: #fff;
	border-color: var(--imperial-red);
}

.btn--primary-light:hover {
	background: var(--imperial-red-hover);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(139, 26, 26, 0.3);
}

.hero__scroll {
	position: absolute;
	bottom: 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
	color: var(--text-light);
	font-family: var(--font-heading);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	animation: bounce 2s ease infinite;
}

.hero__scroll-chevron {
	font-size: 1.4rem;
	margin-top: 4px;
}

@keyframes bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(8px); }
}


/* === Section Shared === */

.section {
	padding: var(--section-pad);
}

.section--alt {
	background: var(--bg-ivory);
}

.section-title {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: clamp(1.4rem, 3.5vw, 2rem);
	color: var(--imperial-red);
	text-align: center;
	margin-bottom: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.section-subtitle {
	font-family: var(--font-body);
	font-size: 1.1rem;
	color: var(--text-muted);
	text-align: center;
	margin-bottom: 48px;
	font-style: italic;
}

.section-ornament {
	display: block;
	text-align: center;
	font-size: 1.2rem;
	color: var(--gold);
	margin-bottom: 48px;
	letter-spacing: 0.3em;
}

.divider {
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, var(--border-stone) 30%, var(--gold) 50%, var(--border-stone) 70%, transparent 100%);
	border: none;
	margin: 0;
}


/* === Meander border (Greek key) === */

.meander-top {
	height: 6px;
	background:
		repeating-linear-gradient(
			90deg,
			var(--gold) 0px, var(--gold) 6px,
			transparent 6px, transparent 12px,
			var(--gold) 12px, var(--gold) 18px,
			transparent 18px, transparent 24px
		);
	opacity: 0.3;
}


/* === Stats Grid === */

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 20px;
	margin-bottom: 48px;
}

.stat-card {
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-top: 3px solid var(--imperial-red);
	border-radius: var(--radius);
	padding: 28px 20px;
	text-align: center;
	transition: box-shadow 0.3s, transform 0.3s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-3px);
}

.stat-card__number {
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 2rem;
	color: var(--imperial-red);
	display: block;
	margin-bottom: 8px;
}

.stat-card__label {
	font-family: var(--font-heading);
	font-size: 0.8rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}


/* === Tribe Distribution === */

.tribe-distribution {
	max-width: 600px;
	margin: 0 auto;
}

.tribe-distribution__title {
	font-family: var(--font-heading);
	font-size: 0.9rem;
	color: var(--text-muted);
	text-align: center;
	margin-bottom: 20px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.tribe-bar {
	display: flex;
	align-items: center;
	margin-bottom: 14px;
	gap: 12px;
}

.tribe-bar__label {
	font-family: var(--font-heading);
	font-size: 0.85rem;
	width: 80px;
	text-align: right;
	color: var(--text-dark);
}

.tribe-bar__track {
	flex: 1;
	height: 24px;
	background: var(--bg-parchment);
	border-radius: 3px;
	overflow: hidden;
	border: 1px solid var(--border-light);
}

.tribe-bar__fill {
	height: 100%;
	border-radius: 2px;
	transition: width 1s ease;
}

.tribe-bar--roman .tribe-bar__fill {
	background: linear-gradient(90deg, var(--roman), #a52a2a);
}
.tribe-bar--teuton .tribe-bar__fill {
	background: linear-gradient(90deg, var(--teuton), #3a6a9b);
}
.tribe-bar--gaul .tribe-bar__fill {
	background: linear-gradient(90deg, var(--gaul), #4a8a4a);
}

.tribe-bar__pct {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	width: 55px;
	color: var(--text-muted);
}


/* === Leaderboard === */

.leaderboard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
}

.leaderboard-panel {
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.leaderboard-panel__header {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--imperial-red);
	padding: 16px 20px;
	background: var(--bg-ivory);
	border-bottom: 2px solid var(--gold);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.leaderboard-table {
	width: 100%;
	border-collapse: collapse;
}

.leaderboard-table th {
	font-family: var(--font-heading);
	font-size: 0.7rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 10px 16px;
	text-align: left;
	border-bottom: 1px solid var(--border-light);
}

.leaderboard-table td {
	font-size: 0.95rem;
	padding: 10px 16px;
	border-bottom: 1px solid var(--border-light);
	color: var(--text-body);
}

.leaderboard-table tr:last-child td {
	border-bottom: none;
}

.leaderboard-table tr:hover td {
	background: var(--bg-ivory);
}

.rank-cell {
	font-family: var(--font-mono);
	font-weight: 700;
	color: var(--text-light);
	width: 40px;
}

.rank-cell--gold { color: var(--gold-bright); }
.rank-cell--silver { color: #888; }
.rank-cell--bronze { color: var(--bronze); }

.player-name {
	color: var(--text-dark);
	font-weight: 600;
}

.tribe-badge {
	font-size: 0.65rem;
	padding: 2px 6px;
	border-radius: 3px;
	font-family: var(--font-mono);
	text-transform: uppercase;
	margin-left: 6px;
	letter-spacing: 0.03em;
}

.tribe-badge--roman { background: rgba(139, 26, 26, 0.1); color: var(--roman); }
.tribe-badge--teuton { background: rgba(42, 90, 139, 0.1); color: var(--teuton); }
.tribe-badge--gaul { background: rgba(58, 122, 58, 0.1); color: var(--gaul); }

.points-cell {
	font-family: var(--font-mono);
	color: var(--text-muted);
	text-align: right;
}


/* === Server Card === */

.server-card {
	max-width: 500px;
	margin: 0 auto;
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-top: 3px solid var(--imperial-red);
	border-radius: var(--radius);
	padding: 40px 32px;
	text-align: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.server-status {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 24px;
}

.status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--laurel);
	animation: pulse 2s ease infinite;
}

@keyframes pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(92, 107, 60, 0.4); }
	50% { box-shadow: 0 0 0 8px rgba(92, 107, 60, 0); }
}

.server-status__text {
	font-family: var(--font-heading);
	font-size: 1rem;
	color: var(--laurel);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.server-stats {
	display: flex;
	justify-content: center;
	gap: 32px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.server-stat {
	text-align: center;
}

.server-stat__value {
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 1.6rem;
	color: var(--imperial-red);
	display: block;
}

.server-stat__label {
	font-family: var(--font-heading);
	font-size: 0.75rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.server-milestones {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.milestone {
	font-family: var(--font-heading);
	font-size: 0.8rem;
	padding: 6px 14px;
	border-radius: 20px;
	border: 1px solid var(--border-stone);
	color: var(--text-muted);
	letter-spacing: 0.04em;
}

.milestone--active {
	border-color: var(--gold);
	color: var(--gold-dim);
	background: rgba(201, 168, 76, 0.08);
}


/* === Hall of Fame === */

.hall-of-fame {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
}

.fame-card {
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius);
	padding: 28px 24px;
	text-align: center;
	position: relative;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.fame-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-dim));
}

.fame-card__crown {
	font-size: 2rem;
	margin-bottom: 12px;
	display: block;
	color: var(--gold);
}

.fame-card__title {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1rem;
	color: var(--imperial-red);
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.fame-card__details {
	font-size: 1rem;
	color: var(--text-muted);
	line-height: 1.5;
	font-style: italic;
}


/* === Gallery === */

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.gallery-item {
	border-radius: var(--radius);
	overflow: hidden;
	cursor: pointer;
	border: 1px solid var(--border-light);
	transition: transform 0.3s, box-shadow 0.3s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gallery-item:hover {
	transform: scale(1.03);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
	display: block;
	width: 100%;
	height: 160px;
	object-fit: cover;
}

/* Lightbox */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(30, 26, 20, 0.94);
	display: none;
	align-items: center;
	justify-content: center;
}

.lightbox--open {
	display: flex;
}

.lightbox__img {
	max-width: 90vw;
	max-height: 85vh;
	border-radius: var(--radius);
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
	border: 2px solid var(--gold-dim);
}

.lightbox__btn {
	position: absolute;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--text-on-dark);
	font-size: 1.6rem;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.lightbox__btn:hover {
	background: rgba(255, 255, 255, 0.2);
}

.lightbox__close {
	top: 20px;
	right: 20px;
}

.lightbox__prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}


/* === Features Grid === */

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.feature-card {
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius);
	padding: 32px 24px;
	text-align: center;
	transition: box-shadow 0.3s, transform 0.3s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	transform: translateY(-3px);
}

.feature-card__icon {
	font-size: 2.4rem;
	margin-bottom: 16px;
	display: block;
	color: var(--imperial-red);
}

.feature-card__title {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1rem;
	color: var(--imperial-red);
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.feature-card__desc {
	font-size: 1rem;
	color: var(--text-muted);
	line-height: 1.6;
}


/* === Footer === */

.site-footer {
	padding: 40px 20px;
	background: var(--bg-hero);
	color: var(--text-on-dark);
}

.site-footer .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}

.footer-brand {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1rem;
	color: var(--gold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.footer-links {
	display: flex;
	gap: 24px;
	list-style: none;
}

.footer-links a {
	font-family: var(--font-heading);
	font-size: 0.8rem;
	color: var(--text-light);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.footer-links a:hover {
	color: var(--gold);
}

.footer-copy {
	width: 100%;
	text-align: center;
	font-size: 0.85rem;
	color: var(--text-light);
	margin-top: 16px;
}


/* === Responsive === */

@media (max-width: 768px) {
	:root {
		--section-pad: 60px 16px;
	}

	.stats-grid {
		grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
		gap: 12px;
	}

	.leaderboard-grid {
		grid-template-columns: 1fr;
	}

	.server-stats {
		gap: 20px;
	}

	.hall-of-fame {
		grid-template-columns: 1fr 1fr;
	}

	.gallery-grid {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	}

	.site-footer .container {
		flex-direction: column;
		text-align: center;
	}

	.footer-links {
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.hero__actions {
		flex-direction: column;
		width: 100%;
		padding: 0 20px;
	}

	.btn {
		width: 100%;
		text-align: center;
	}

	.stats-grid {
		grid-template-columns: 1fr 1fr;
	}

	.tribe-bar__label {
		width: 60px;
		font-size: 0.8rem;
	}

	.leaderboard-table th,
	.leaderboard-table td {
		padding: 8px 10px;
		font-size: 0.8rem;
	}

	.hall-of-fame {
		grid-template-columns: 1fr;
	}

	.features-grid {
		grid-template-columns: 1fr;
	}
}
