/*
 * Northfire modern theme
 * Built by Kyle Bargman
 * Keeps the original look (black, flame logo centered in a split menu,
 * dark red accents) with a responsive, readable layout.
 */

:root{
	--bg:            #0d0d0d;
	--bg-band:       #151515;
	--surface:       #141414;
	--surface-2:     #1b1b1b;
	--border:        #262626;
	--border-strong: #333333;
	--text:          #d6d6d6;
	--text-strong:   #f2f2f2;
	--muted:         #8a8a8a;
	--accent:        #5a0000;	/* original Northfire red */
	--accent-2:      #8f1010;
	--accent-hot:    #c0281c;
	--flame:         linear-gradient(90deg, transparent, #8f1010 15%, #e0461c 40%, #ffae2b 50%, #e0461c 60%, #8f1010 85%, transparent);
	--radius:        8px;
	--shadow:        0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.35);
	--max:           1080px;
}

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

html{ -webkit-text-size-adjust:100%; }

body{
	margin:0;
	background:
		radial-gradient(1200px 400px at 50% -120px, rgba(143,16,16,.18), transparent 70%),
		var(--bg);
	color:var(--text);
	font:15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Verdana, sans-serif;
	min-height:100vh;
}

a, a:link, a:visited{ color:#c9c9c9; text-decoration:none; }
a:hover, a:active{ color:#fff; }
.content a, .content a:link, .content a:visited{ color:#e8a87c; }
.content a:hover{ color:#ffd0a8; text-decoration:underline; }
a.light, a.light:link, a.light:visited{ color:var(--text-strong); }
a.light:hover{ color:var(--muted); }

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

/* ---------- Header ---------- */
/* The logo image has the original menu band and red breadcrumb bar baked in,
   so the header uses the original stripe1.gif and keeps the 135px geometry. */

.site-header{
	position:relative;
	background:#181818 url('/images/stripe1.gif') repeat-x top;
}
.site-header::after{
	content:"";
	position:absolute; left:0; right:0; bottom:-1px;
	height:2px;
	background:var(--flame);
	opacity:.85;
}

.header-inner{
	max-width:var(--max);
	margin:0 auto;
	padding:0 20px;
	display:grid;
	grid-template-columns:1fr 203px 1fr;
	align-items:start;
	column-gap:12px;
	height:135px;
}

.logo{ display:block; line-height:0; }
.logo img{ display:block; width:203px; height:135px; }

.nav{
	display:flex;
	gap:2px;
	margin-top:88px;
	height:26px;
	align-items:center;
}
.nav-left { justify-content:flex-end; }
.nav-right{ justify-content:flex-start; }

.nav a, .nav a:link, .nav a:visited{
	position:relative;
	padding:4px 14px;
	border-radius:5px;
	color:#cfcfcf;
	font-size:14px;
	font-weight:600;
	letter-spacing:.02em;
	transition:background .15s;
}
.nav a:hover{ background:#2a2a2a; color:#fff; }
.nav a.active, .nav a:hover{ color:#fff; }
.nav a.active::after{
	content:"";
	position:absolute; left:14px; right:14px; bottom:-1px;
	height:2px; border-radius:2px;
	background:var(--accent-hot);
}

/* sits on the red bar in the logo image (y 119-135) */
.breadcrumb{
	position:absolute;
	top:119px; left:50%;
	transform:translateX(-50%);
	min-width:156px;
	height:16px;
	padding:0 10px;
	background:var(--accent);
	font-size:11px;
	line-height:16px;
	color:#f0d6d6;
	text-align:center;
	white-space:nowrap;
}
.breadcrumb .sep{ opacity:.6; margin:0 6px; }

/* ---------- Layout ---------- */

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

main.container{ padding-top:28px; padding-bottom:40px; }

.notice{
	background:linear-gradient(180deg, var(--surface-2), var(--surface));
	border:1px solid var(--border);
	border-left:3px solid var(--accent-hot);
	border-radius:var(--radius);
	padding:14px 18px;
	font-size:16px;
	color:var(--text-strong);
	text-align:center;
	box-shadow:var(--shadow);
}
.notice strong{ color:#ffb38a; font-weight:600; }

.banner{ text-align:center; margin:22px 0 6px; }
.banner img{ border-radius:6px; box-shadow:0 6px 20px rgba(0,0,0,.5); }

/* Page content: the .inc pages use fixed-width .column blocks; make them fluid */
.content{
	display:flex;
	flex-wrap:wrap;
	gap:24px;
	margin-top:24px;
	align-items:flex-start;
}
.content > .column,
.content > .code,
.content > div:not(.barrier){
	flex:1 1 380px;
	min-width:0;
	width:auto !important;
	float:none;
	padding:22px 24px;
	background:var(--surface);
	border:1px solid var(--border);
	border-radius:var(--radius);
	box-shadow:var(--shadow);
}
.content > .column:only-of-type,
.content > [style*="765"]{ flex-basis:100%; }
.content > p, .content > h4, .content > br{ flex-basis:100%; margin:0; }
.content > br{ display:none; }
.content .column .column{ width:auto !important; float:none; padding:0; }
.content div[style*="width"]{ width:auto !important; max-width:100%; }
.content .barrier{ display:none; }

/* Text styles used throughout the .inc pages */
.column_header, .head{
	font-size:20px;
	font-weight:700;
	color:var(--text-strong);
	margin:0 0 2px;
	letter-spacing:.01em;
}
.column_subheader{
	font-size:12px;
	color:var(--muted);
	margin:0 0 12px;
}
.large{ font-size:17px; font-weight:600; color:var(--text-strong); }
.dark{ color:var(--muted); }
.seperator{ height:1px; background:var(--border); margin:20px 0; border:0; }

dl{ margin:0 0 18px; }
dt{ font-weight:600; color:var(--text-strong); margin-bottom:4px; }
dd{ margin:0 0 4px 0; padding-left:14px; border-left:2px solid var(--border-strong); }
ul{ padding-left:20px; }
li{ margin:3px 0; }

pre, .code pre{
	background:#0a0a0a;
	border:1px solid var(--border);
	border-radius:6px;
	padding:16px;
	overflow-x:auto;
	font:13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color:#e7c7a0;
	text-align:left;
}

/* News items (from forums/news.php) */
.content .column .large{ margin-bottom:2px; }
.content .column .large + .column_subheader{ margin-bottom:8px; }

/* ---------- Screenshots ---------- */

.box_column{ width:100% !important; float:none; }
.box{
	background:var(--surface-2);
	border:1px solid var(--border);
	border-radius:6px;
	padding:6px 10px;
	text-align:center;
	margin:0;
}
#ss_box{
	height:auto !important;
	aspect-ratio:868/427;
	padding:0;
	overflow:hidden;
	background:#0a0a0a url('/images/loading.gif') center no-repeat;
}
#ss_img{
	width:100%; height:100%;
	background-size:cover;
	background-position:center top;
	cursor:zoom-in;
	transition:opacity .2s;
}
.ss_buttons{ display:flex; gap:6px; margin-top:10px; }
.ss_button{
	flex:1;
	padding:5px 0;
	text-align:center;
	border-radius:5px;
	background:var(--surface-2);
	border:1px solid var(--border);
	cursor:pointer;
	font-size:13px;
	transition:background .15s, border-color .15s;
}
.ss_button:hover{ background:#262626; }
.ss_button.active{ background:var(--accent); border-color:var(--accent-2); color:#fff; }

/* ---------- Lower band: contact + staff ---------- */

.lower{
	background:var(--bg-band);
	border-top:1px solid var(--border);
	padding:40px 0;
}
.lower .container{
	display:grid;
	grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);
	gap:24px;
}
.card{
	background:var(--surface);
	border:1px solid var(--border);
	border-radius:var(--radius);
	padding:22px 24px;
	box-shadow:var(--shadow);
}

.field{ margin-bottom:14px; }
.field label{ display:block; font-size:13px; font-weight:600; margin-bottom:5px; color:#bdbdbd; }
.field input, .field textarea{
	width:100%;
	padding:10px 12px;
	background:#0b0b0b;
	border:1px solid var(--border-strong);
	border-radius:6px;
	color:var(--text-strong);
	font:inherit;
	font-size:14px;
	transition:border-color .15s, box-shadow .15s;
}
.field textarea{ resize:vertical; min-height:110px; }
.field input:focus, .field textarea:focus{
	outline:none;
	border-color:var(--accent-hot);
	box-shadow:0 0 0 3px rgba(192,40,28,.25);
}

.btn{
	display:inline-block;
	padding:10px 22px;
	border:1px solid var(--accent-2);
	border-radius:6px;
	background:linear-gradient(180deg, var(--accent-2), var(--accent));
	color:#fff;
	font:inherit; font-weight:600; font-size:14px;
	cursor:pointer;
	transition:filter .15s, opacity .15s;
}
.btn:hover:not(:disabled){ filter:brightness(1.2); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }

#contact_status{ min-height:1.2em; margin:10px 0 0; font-size:13px; color:#e8b4a0; }
.g-recaptcha{ margin:4px 0 14px; }

.staff-grid{
	display:grid;
	grid-template-columns:repeat(2, minmax(0,1fr));
	gap:12px;
	margin:6px 0 16px;
}
.staff{
	display:flex; flex-direction:column;
	padding:12px 14px;
	background:var(--surface-2);
	border:1px solid var(--border);
	border-radius:6px;
	transition:border-color .15s;
}
.staff:hover{ border-color:var(--accent-2); }
.staff a, .staff a:visited{ font-weight:700; color:var(--text-strong); font-size:15px; }
.staff a:hover{ color:#ffb38a; }
.staff span{ font-size:12px; color:var(--muted); }

.site-footer{
	text-align:center;
	padding:24px 20px 40px;
	font-size:13px;
	color:var(--muted);
	border-top:1px solid var(--border);
}
.site-footer a{ color:#b0b0b0; }
.site-footer a:hover{ color:#fff; }
.site-footer .links{ margin-top:6px; display:flex; gap:16px; justify-content:center; }

/* ---------- Responsive ---------- */

@media (max-width: 760px){
	.header-inner{
		height:auto;
		grid-template-columns:1fr 1fr;
		grid-template-areas:"logo logo" "left right";
		padding:0 8px;
	}
	.logo{ grid-area:logo; justify-self:center; }
	.nav-left{ grid-area:left; }
	.nav-right{ grid-area:right; }
	.header-inner{ column-gap:4px; }
	.nav{ margin:8px 0 10px; height:auto; gap:0; }
	.nav a, .nav a:link, .nav a:visited{ padding:6px 6px; font-size:12.5px; letter-spacing:0; }
	.nav a.active::after{ left:6px; right:6px; }
	.notice{ font-size:15px; }
	.lower .container{ grid-template-columns:1fr; }
	.content > .column, .content > div:not(.barrier){ padding:18px; }
}

@media (max-width: 420px){
	.staff-grid{ grid-template-columns:1fr; }
	.nav a, .nav a:link, .nav a:visited{ padding:6px 4px; font-size:12px; }
	.nav a.active::after{ left:4px; right:4px; }
}
