/* I367: the portal, in Noctis RO's look: the night with the Blood Moon, gold edges, Marcellus SC for the names and Fira Sans for the text (the launcher's and the site's) */
@font-face { font-family: 'Marcellus SC'; font-weight: 400; font-display: swap; src: url(fonts/marcellus-sc-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 400; font-display: swap; src: url(fonts/fira-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 600; font-display: swap; src: url(fonts/fira-sans-latin-600-normal.woff2) format('woff2'); }

:root {
	--bg: #0a0909;
	--panel: #141111;
	--line: #3b3330;
	--gold: #c9a45c;
	--gold-bright: #e8c77f;
	--red: #c21a22;
	--text: #e8dfd4;
	--muted: #a39b94;
	--ok: #3ddc84;
	--wait: #e0b34a;
	--error: #ff6b5a;
	--display: 'Marcellus SC', Georgia, serif;
	--body: 'Fira Sans', 'Segoe UI', sans-serif;
	color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
	min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
	background: radial-gradient(ellipse 60% 45% at 50% 18%, rgba(140, 12, 20, 0.35), transparent 70%), radial-gradient(ellipse at 50% 120%, #1a0b0c, var(--bg) 60%);
	color: var(--text); font: 16px/1.5 var(--body);
}

.moon { position: relative; width: 132px; aspect-ratio: 1; margin: 0 auto -8px; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #efe4d8 0%, #c3b3a3 30%, #7b6c62 62%, #2b2321 100%); box-shadow: 0 0 80px rgba(194, 26, 34, 0.35); }
.moon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #ff5a4f 0%, #c0141d 38%, #5e0509 75%, #1c0204 100%); opacity: 0.85; animation: bleed 9s ease-in-out infinite; }
@keyframes bleed { 0%, 100% { opacity: 0.35; } 45%, 60% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .moon::after { animation: none; } }

.card { position: relative; width: min(440px, 100%); padding: 28px 30px 26px; background: linear-gradient(180deg, #1a1716, #0e0c0c); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.card::before, .card::after { content: ''; position: absolute; width: 22px; height: 22px; border: 2px solid var(--gold); }
.card::before { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
.card::after { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }
.wide { width: min(620px, 100%); }

h1 { margin: 18px 0 2px; text-align: center; font: 400 38px/1.1 var(--display); letter-spacing: 0.14em; color: var(--gold-bright); text-shadow: 0 2px 0 #000, 0 0 18px rgba(224, 179, 74, 0.25); }
.sub { margin: 0 0 22px; text-align: center; font: 400 14px var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }

form { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
input { font: 16px var(--body); color: var(--text); background: #0a0808; border: 1px solid var(--line); padding: 10px 12px; width: 100%; }
input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 16px; font: 400 18px var(--display); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: box-shadow 0.2s, border-color 0.2s, opacity 0.2s; }
.btn-red { color: #fff; background: linear-gradient(180deg, #c21a22, #7d0b11); border: 1px solid #e0464c; box-shadow: 0 0 0 1px #3a0306, 0 0 30px rgba(194, 26, 34, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-red:hover:not(:disabled) { box-shadow: 0 0 0 1px #3a0306, 0 0 50px rgba(224, 38, 47, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-gold { color: #1a1006; background: linear-gradient(#ffd977, #c99528); border: 1px solid #fff0b8; box-shadow: 0 0 18px rgba(224, 179, 74, 0.3); }
.btn-gold:hover { background: linear-gradient(#ffe39a, #d9a535); }
.btn:disabled { color: #8a7f76; background: #1d1918; border-color: var(--line); box-shadow: none; cursor: default; }
.btn:focus-visible, .link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.message { min-height: 1.5em; margin: 0; font-size: 14px; color: var(--error); text-align: center; }
.note { margin: 18px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.link { background: none; border: none; padding: 0; color: var(--gold); font: 14px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--gold-bright); }

.state { display: grid; gap: 6px; margin: 4px 0 22px; padding: 18px 20px; background: #0d0b0b; border: 1px solid var(--line); }
.state-line { display: flex; align-items: center; gap: 12px; font: 400 24px var(--display); letter-spacing: 0.08em; }
.state-text { margin: 0; font-size: 15px; color: #cfc6bc; }
.state-time { margin: 0; font-size: 12.5px; color: var(--muted); }
.dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #6d6461; }
[data-state='online'] .dot { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
[data-state='ligando'] .dot, [data-state='desligando'] .dot { background: var(--wait); box-shadow: 0 0 12px var(--wait); animation: pulse 1.4s ease-in-out infinite; }
[data-state='sem-maquina'] .dot, [data-state='erro'] .dot { background: var(--error); }
[data-state='online'] .state-line { color: #b9f3cf; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none !important; } }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .actions { grid-template-columns: 1fr; } h1 { font-size: 30px; } }

/* #/home and the site's other pages: the site fills the window, with a way back to the panel */
.site { position: fixed; inset: 0; background: var(--bg); }
.site iframe { display: block; width: 100%; height: 100%; border: 0; }
.back { position: fixed; right: 18px; bottom: 18px; z-index: 1; padding: 8px 14px; font: 400 14px var(--display); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--gold-bright); background: rgba(10, 9, 9, 0.85); border: 1px solid var(--gold); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); }
.back:hover { color: #fff; border-color: var(--gold-bright); }
.back:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
