/* =====================================================================
   Illusions of Levia — official website, V1
   One stylesheet. Colours and fonts are set once in :root below.
   ===================================================================== */

@font-face {
	font-family: "Cinzel";
	src: url("../assets/fonts/Cinzel-Variable.ttf") format("truetype");
	font-weight: 400 900;
	font-display: swap;
}
@font-face {
	font-family: "PT Serif Caption";
	src: url("../assets/fonts/PTSerifCaption-Regular.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "PT Serif Caption";
	src: url("../assets/fonts/PTSerifCaption-Italic.ttf") format("truetype");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

:root {
	--ink: #060b18;
	--night: #0a1430;
	--night-2: #0f1d40;
	--panel: rgba(13, 22, 46, 0.82);
	--panel-solid: #0d162e;
	--line: rgba(217, 180, 95, 0.28);
	--gold: #d9b45f;
	--gold-bright: #f3d892;
	--silver: #eef2f8;
	--text: #d8deea;
	--muted: #98a3ba;
	--sapphire: #5ab0ff;
	--sapphire-glow: rgba(90, 176, 255, 0.35);
	--status-live: #7fd6a0;      /* in the game today */
	--status-dev: #5ab0ff;       /* being built */
	--status-planned: #a9b2c6;   /* planned */
	--radius: 10px;
	--wrap: 1180px;
	--header-h: 68px;
	--font-display: "Cinzel", "Trajan Pro", Georgia, serif;
	--font-body: "PT Serif Caption", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
	margin: 0;
	background: var(--ink);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-bright); text-decoration-color: rgba(243, 216, 146, 0.4); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--silver); line-height: 1.25; margin: 0 0 .6em; letter-spacing: .02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--gold); color: var(--ink); padding: .5rem 1rem; border-radius: 6px; font-weight: 700; }
.skip-link:focus { top: 1rem; }

/* ---------------------------------------------------------------- header */
.site-header {
	position: fixed; inset: 0 0 auto 0; z-index: 50;
	height: var(--header-h);
	display: flex; align-items: center;
	background: linear-gradient(to bottom, rgba(6, 11, 24, 0.85), rgba(6, 11, 24, 0));
	transition: background .3s ease, box-shadow .3s ease;
}
.site-header.is-solid { background: rgba(6, 11, 24, 0.94); box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; }
.brand img { height: 46px; width: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.nav-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .3rem; }
.site-nav a {
	display: block; padding: .5rem .75rem; border-radius: 6px;
	font-family: var(--font-display); font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	color: var(--silver); text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--gold-bright); background: rgba(217, 180, 95, .08); }

@media (max-width: 980px) {
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 44px; height: 44px; border-radius: 8px;
		background: rgba(13, 22, 46, .8); border: 1px solid var(--line); color: var(--gold-bright); cursor: pointer;
	}
	.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
	.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
	.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
	.nav-toggle[aria-expanded="true"] span { background: transparent; }
	.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
	.site-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: rgba(6, 11, 24, .97); border-bottom: 1px solid var(--line); display: none; }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; padding: .5rem 1.25rem 1rem; }
	.site-nav a { padding: .8rem .5rem; font-size: .95rem; border-bottom: 1px solid rgba(217, 180, 95, .1); }
	.no-js .site-nav { display: block; position: static; background: none; border: 0; }
}

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-bg img { object-fit: cover; object-position: 55% 60%; }
.hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(ellipse at 50% 45%, rgba(6, 11, 24, .15) 0%, rgba(6, 11, 24, .55) 70%),
		linear-gradient(to bottom, rgba(6, 11, 24, .55) 0%, rgba(6, 11, 24, .05) 30%, rgba(6, 11, 24, .25) 65%, var(--ink) 100%);
}
.hero-inner { padding: calc(var(--header-h) + 2rem) 1.25rem 5rem; max-width: 900px; }
.hero-logo { width: min(640px, 88vw); margin: 0 auto .5rem; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .65)); }
.hero-tagline { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .28em; font-size: clamp(.8rem, 1.6vw, 1.05rem); color: var(--gold-bright); text-shadow: 0 2px 10px rgba(0, 0, 0, .9); margin-bottom: 1rem; }
.hero-text { font-size: clamp(1.02rem, 1.7vw, 1.2rem); color: var(--silver); text-shadow: 0 2px 12px rgba(0, 0, 0, .95); max-width: 46rem; margin: 0 auto 1.4rem; }
.dev-badge {
	display: inline-flex; align-items: center; gap: .6rem;
	padding: .5rem 1.1rem; margin-bottom: 1.6rem;
	border: 1px solid rgba(90, 176, 255, .55); border-radius: 999px;
	background: rgba(6, 11, 24, .72); box-shadow: 0 0 22px var(--sapphire-glow);
	font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--silver);
}
.dev-badge::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sapphire); box-shadow: 0 0 10px var(--sapphire); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.scroll-hint { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); color: var(--gold); font-size: 1.4rem; text-decoration: none; opacity: .8; }

/* ---------------------------------------------------------------- buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 46px; padding: .7rem 1.4rem; border-radius: 6px;
	font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
	transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-gold { color: #1a1206; background: linear-gradient(180deg, #f6dd9b 0%, #d9b45f 55%, #b48a3c 100%); box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover { color: #1a1206; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, .5), 0 0 18px rgba(243, 216, 146, .35); }
.btn-ghost { color: var(--silver); border: 1px solid rgba(238, 242, 248, .45); background: rgba(6, 11, 24, .55); }
.btn-ghost:hover { color: var(--gold-bright); border-color: var(--gold); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---------------------------------------------------------------- sections */
.section { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: radial-gradient(ellipse at 50% 0%, var(--night-2) 0%, var(--night) 45%, var(--ink) 100%); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(2rem, 5vw, 3.2rem); }
.eyebrow { display: block; font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.divider { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: .4rem auto 1.2rem; }
.divider::before, .divider::after { content: ""; height: 1px; width: min(120px, 22vw); background: linear-gradient(to right, transparent, var(--gold)); }
.divider::after { transform: scaleX(-1); }
.divider span { width: 10px; height: 10px; transform: rotate(45deg); background: var(--sapphire); box-shadow: 0 0 12px var(--sapphire); }
.lead { font-size: 1.15rem; color: var(--silver); }
.muted { color: var(--muted); }

/* status chips: what is in the game, what is being built, what is planned */
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .6rem; border-radius: 999px; font-family: var(--font-display); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--status-live); }
.status-dev { color: var(--status-dev); }
.status-planned { color: var(--status-planned); }
.status-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.2rem; margin: 0 auto 2.4rem; font-size: .95rem; color: var(--muted); }
.status-legend li { display: flex; align-items: center; gap: .5rem; }
.status-legend { list-style: none; padding: 0; }

/* cards */
.card {
	position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 1.5rem 1.5rem 1.3rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.card::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(217, 180, 95, .1); border-radius: 6px; pointer-events: none; }
.card h3 { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1rem; margin: 0 0 1em; }
.card li { margin-bottom: .35rem; }
.card li .status { margin-left: .35rem; vertical-align: middle; }
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

/* about: intro with a picture */
.intro-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; margin-bottom: 3rem; }
.framed { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.framed figcaption, figure figcaption { font-size: .9rem; color: var(--muted); padding: .6rem .9rem; background: rgba(6, 11, 24, .85); font-style: italic; }
figure { margin: 0; }
@media (max-width: 860px) { .intro-split { grid-template-columns: 1fr; } }

/* races */
.race-card { text-align: center; padding-top: 1.8rem; }
.race-card .emblem { width: 72px; height: auto; margin: 0 auto .9rem; image-rendering: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.race-card h3 { justify-content: center; }
.race-meta { font-size: .9rem; color: var(--muted); margin-bottom: .8rem; }
.race-card > p:not(.race-meta), .race-card ul { text-align: left; }
.race-card ul { border-top: 1px solid rgba(217, 180, 95, .18); padding-top: .8rem; list-style: none; padding-left: 0; }
.race-card strong { color: var(--gold-bright); font-weight: 400; font-family: var(--font-display); font-size: .92rem; letter-spacing: .03em; }

/* classes */
.class-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.class-card { display: grid; grid-template-columns: 56px 1fr; gap: .1rem 1rem; align-items: center; padding: 1.1rem 1.3rem; }
.class-card img { grid-row: span 2; width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .6)); }
.class-card h4 { margin: 0; font-size: 1.1rem; color: var(--silver); align-self: end; }
.class-card .status { justify-self: start; align-self: start; }
.class-card p { grid-column: 1 / -1; margin: .8rem 0 0; font-size: .97rem; }
.class-card.is-planned img { filter: grayscale(.55) brightness(.8) drop-shadow(0 3px 8px rgba(0, 0, 0, .6)); }
.subhead { text-align: center; margin: 3.2rem 0 1.5rem; }

/* world */
.region-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.region-card .region-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }
.region-card .region-body { padding: 1.2rem 1.4rem 1.3rem; }
.region-card .region-type { font-family: var(--font-display); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.region-card.no-img .region-body { border-top: 3px solid rgba(90, 176, 255, .35); }

/* gallery */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.gallery a { display: block; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; text-decoration: none; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .35s ease, filter .35s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); filter: brightness(1.1); }
.gallery figcaption { position: relative; }
.gallery-note { text-align: center; font-size: .92rem; color: var(--muted); margin-top: 1.4rem; }

.lightbox { width: min(1500px, 96vw); max-height: 96vh; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #02050c; color: var(--text); }
.lightbox::backdrop { background: rgba(2, 5, 12, .9); }
.lightbox img { width: 100%; max-height: calc(96vh - 4.5rem); object-fit: contain; background: #000; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; }
.lightbox-bar p { margin: 0; font-size: .95rem; font-style: italic; color: var(--muted); }
.lightbox-bar .controls { display: flex; gap: .4rem; flex-shrink: 0; }
.lightbox button { min-width: 44px; min-height: 40px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-solid); color: var(--gold-bright); font-size: 1.1rem; cursor: pointer; }
.lightbox button:hover { border-color: var(--gold); }

/* news */
.news-list { display: grid; gap: 1.2rem; max-width: 860px; margin: 0 auto; }
.news-item header { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .5rem; }
.news-item time { font-family: var(--font-display); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.news-item h3 { margin: 0 0 .5rem; display: block; }

/* community */
.community-card { max-width: 760px; margin: 0 auto; text-align: center; padding: 2.2rem 1.6rem; }
.community-card .btn { margin-top: .6rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: #04070f; padding: 2.6rem 0 2rem; font-size: .92rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1.2rem; justify-items: center; text-align: center; }
.site-footer img { width: 180px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; }
.footer-nav a { color: var(--muted); text-decoration: none; font-family: var(--font-display); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-nav a:hover { color: var(--gold-bright); }
.site-footer p { margin: 0; max-width: 680px; }

/* phones: a portrait crop of the background, tighter spacing */
@media (max-width: 640px) {
	body { font-size: 1rem; }
	.hero-bg img { object-position: 50% 50%; }
	.hero-inner { padding-bottom: 4rem; }
	.dev-badge { font-size: .66rem; letter-spacing: .07em; padding: .45rem .9rem; }
	.card { padding: 1.2rem 1.1rem 1.1rem; }
	.class-card { grid-template-columns: 48px 1fr; }
	.class-card img { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
