/* ascelion overrides on top of the Hyperspace main.css (loaded after it). */

/* Chelsea Market, SIL OFL 1.1 (see fonts/OFL.txt), served unmodified from this site. */
@font-face {
	font-family: 'Chelsea Market';
	src: url('../fonts/ChelseaMarket-Regular.ttf') format('truetype');
	font-display: swap;
}

/* Colours as on ascelion.ai: dark navy surfaces, and an accent palette (--p1..--p3) that
   palette.js picks at random on each load. The --p values here are the fallback when scripts
   are off. main.css paints its bands with --a*, its sidebar and body with --bg*. */
:root {
	--p1: #38bdf8;
	--p2: #818cf8;
	--p3: #c084fc;

	--border:   #1e293b;
	--bg:       #080d1a;
	--bg-alt:   #060a14;
	--bg-light: #0f172a;
	--bg-90:    rgba(8, 13, 26, 0.9);

	--a1:       #0f172a;
	--a1-alt:   #080d1a;
	--a2:       #0b1222;
	--a2-alt:   #080d1a;
	--a3:       #0f172a;
	--a3-alt:   #080d1a;

	--gutter:   clamp(1.5rem, 5vw, 4rem);
}

body, input, select, textarea { color: #94a3b8; }
strong, b { color: #e2e8f0; }

/* ── Page frame, as on ascelion.ai: header and footer always visible, the sidebar and the
   content scroll between them. ── */
html, body { height: 100%; }
body {
	height: 100svh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
#header-bar, #footer { flex: 0 0 auto; }
#layout {
	flex: 1 1 0;
	min-height: 0;
	display: flex;
}
#layout > #sidebar {
	position: static;
	flex: 0 0 18em;
	height: auto;
	padding-bottom: 2.5em;
	border-right: 1px solid var(--border);
}
#layout > #wrapper {
	flex: 1 1 0;
	min-width: 0;
	margin-left: 0;
	padding-top: 0;
	overflow-y: auto;
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { #layout > #wrapper { scroll-behavior: auto; } }

/* Below 981px the template's sidebar is a 3.5em bar; here it sits under the header. */
@media screen and (max-width: 980px) {
	#layout { flex-direction: column; }
	#layout > #sidebar { flex: 0 0 3.5em; width: 100%; padding: 0; border-right: 0;
	                     border-bottom: 1px solid var(--border); }
}

/* ── Header: logo and wordmark on the left, the tagline on the right. ── */
#header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5em;
	padding: 1em var(--gutter);
	background: rgba(8, 13, 26, 0.88);
	border-bottom: 1px solid var(--border);
	position: relative;
	z-index: 10001;
}
#header-bar .brand {
	display: flex;
	align-items: center;
	gap: 0.6em;
	border: 0;
	flex: 0 0 auto;
}
#header-bar .logo-mark { width: 2.2em; height: auto; color: var(--p1); }
#header-bar .brand .wordmark { font-size: 1.35em; line-height: 1; }
#header-bar .hero-title {
	margin: 0;
	text-align: right;
	font-family: 'Chelsea Market', cursive;
	font-weight: normal;
	font-size: clamp(1.1rem, 4vw, 1.9rem);
	line-height: 1.15;
	white-space: nowrap;
	background: linear-gradient(135deg, var(--p1) 0%, var(--p2) 55%, var(--p3) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
@media screen and (max-width: 600px) {
	#header-bar { padding: 0.75em var(--gutter); }
	#header-bar .hero-title { white-space: normal; }
}

/* Wordmark (header, footer): Chelsea Market with the palette gradient, lowercase "ascelion".
   In running text the company name stays "Ascelion". */
.wordmark {
	font-family: 'Chelsea Market', cursive;
	font-weight: normal;
	letter-spacing: 0;
	text-transform: lowercase;
	background: linear-gradient(135deg, var(--p1) 0%, var(--p2) 55%, var(--p3) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* Bands are separated by a hairline, as the panels on ascelion.ai. */
#wrapper > .wrapper + .wrapper { border-top: 1px solid var(--border); }

/* Section headings in the first accent. */
#wrapper > .wrapper > .inner > h2 { color: var(--p1); }

/* Active menu line in the accent gradient. */
#sidebar nav a:after {
	background-image: linear-gradient(to right, var(--p1), var(--p3));
}
@media screen and (max-width: 980px) {
	#sidebar nav a:after { background-image: none; background-color: var(--p1); }
}

/* Feature icons: accent discs with dark glyphs, cycling through the three accents. */
.features .icon.major { background: var(--p1); }
.features section:nth-child(3n+2) .icon.major { background: var(--p2); }
.features section:nth-child(3n) .icon.major { background: var(--p3); }
.wrapper.wrapper .features .icon.major:before { color: var(--bg); }

/* About: readable line length. */
#about .inner > p { max-width: 46em; }
#about .aside { border-left: solid 3px var(--p1); padding-left: 1em; }

/* Selected work: the country under each project. */
.features .where {
	display: block;
	margin-top: 0.5em;
	font-size: 0.75em;
	font-weight: bold;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--p2);
}

/* ── Footer as on ascelion.ai: the Ukraine line on the left, "ascelion — since 1995" on the
   right; the legal identification below, small but legible. ── */
#footer {
	background: var(--bg);
	border-top: 1px solid var(--border);
	position: relative;
	z-index: 10001;
}
#footer > .inner { width: 100%; padding: 1em var(--gutter); }
#footer .footer-row {
	display: flex;
	flex-direction: row-reverse;
	justify-content: space-between;
	align-items: center;
	gap: 1.5em;
}
#footer .footer-logo { flex: 0 0 auto; white-space: nowrap; font-size: 0.95em; }
#footer .ukraine { flex: 1 1 auto; min-width: 0; font-size: 0.75em; letter-spacing: 0.03em; color: #94a3b8; }
#footer .ukraine:before {
	content: '';
	display: inline-block;
	width: 1.2em;
	height: 0.75em;
	margin-right: 0.4em;
	vertical-align: -0.05em;
	background: linear-gradient(to bottom, #005BBB 50%, #FFD500 50%);
}
#footer .footer-legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.25em 1.5em;
	margin-top: 0.5em;
	font-size: 0.65em;
	color: #64748b;
}
@media screen and (max-width: 600px) {
	#footer > .inner { padding: 0.75em var(--gutter); }
	#footer .footer-row { gap: 0.75em; }
}
