/*
	File: assets/css/theme.css
	Purpose: Theme layer over Bootstrap 5 for the "Harbor" (cyan) template —
	         dark one-pager/multi-page kit: transparent hero nav, full-viewport
	         spotlight panels, feature/CTA wrappers, sidebar layouts, form and
	         table styling, footer, and the in-page theme switcher (data-theme
	         accent + spotlight-tone overrides plus swatch styles) that makes
	         this a self-describing tour of the whole template.
	         Loads after bootstrap.min.css.
	Used by: index.html, elements.html, left-sidebar.html, right-sidebar.html,
	         no-sidebar.html
*/

/* Palette + metrics */

	:root {
		--accent: #55b8c4;
		--accent-rgb: 85, 184, 196;
		--accent-hover: #68c0cb;
		--accent-active: #42b0bd;
		--spotlight-b: #ce6a86;
		--spotlight-c: #78c8b2;
		--ink: #1c1d26;
		--panel: #272833;
		--panel-transparent: rgba(23, 24, 32, 0.95);
		--panel-hairline: rgba(255, 255, 255, 0.035);
		--fg-bold: #ffffff;
		--fg: rgba(255, 255, 255, 0.75);
		--fg-light: rgba(255, 255, 255, 0.5);
		--fg-lighter: rgba(255, 255, 255, 0.15);
		--border: rgba(255, 255, 255, 0.3);
		--border-bg: rgba(255, 255, 255, 0.075);
		--navbar-height: 3.5rem;

		/* Bootstrap theme variables: several core components (.table,
		   .table-striped, form validation states, etc.) read --bs-body-bg /
		   --bs-emphasis-color / --bs-border-color directly rather than
		   inheriting the computed body background. Left at Bootstrap's
		   light-theme defaults, .table renders a white box on this dark page
		   regardless of the .table color rules below — override at the root
		   so every Bootstrap component that reads them stays dark by default. */
		--bs-body-bg: var(--ink);
		--bs-body-color: var(--fg);
		--bs-emphasis-color: var(--fg-bold);
		--bs-border-color: var(--border);
	}

	/* In-page theme preview: the navbar swatches set data-theme on <html> so
	   all seven palettes can be compared without opening another build. Cyan
	   is the default (:root above); green and magenta mirror the two real
	   variant folders (bs5/harbor/green|magenta); amber, violet, crimson, and
	   slate are four additional palettes in the same dark-theme-compatible
	   family, added so the switcher offers seven choices like the orbit/blue
	   and apex/blue references. Each block overrides all six custom
	   properties the theme reads: the accent triad (used on buttons, links,
	   focus rings, and the tone-a spotlight border) plus the two secondary
	   spotlight-tone colors (tone-b, tone-c borders on spotlight panels two
	   and three). --ink/--panel/--fg-* stay fixed across every palette —
	   only the accent hues change, so contrast against the dark chrome
	   never has to be re-checked per theme. */
	:root[data-theme="green"] {
		--accent: #59b377;
		--accent-rgb: 89, 179, 119;
		--accent-hover: #6abb85;
		--accent-active: #4ca66a;
		--spotlight-b: #4ea5d2;
		--spotlight-c: #d57dad;
	}

	:root[data-theme="magenta"] {
		--accent: #e44c65;
		--accent-rgb: 228, 76, 101;
		--accent-hover: #e76278;
		--accent-active: #e13652;
		--spotlight-b: #5480f1;
		--spotlight-c: #39c088;
	}

	:root[data-theme="amber"] {
		--accent: #d69a44;
		--accent-rgb: 214, 154, 68;
		--accent-hover: #dda95c;
		--accent-active: #c98d36;
		--spotlight-b: #6a93d1;
		--spotlight-c: #6bbf8e;
	}

	:root[data-theme="violet"] {
		--accent: #9a7fd6;
		--accent-hover: #a891dd;
		--accent-active: #8a6bcf;
		--accent-rgb: 154, 127, 214;
		--spotlight-b: #d68f6a;
		--spotlight-c: #5db2b0;
	}

	:root[data-theme="crimson"] {
		--accent: #d64e6f;
		--accent-hover: #dd657f;
		--accent-active: #c93a5d;
		--accent-rgb: 214, 78, 111;
		--spotlight-b: #d6a24e;
		--spotlight-c: #5f9fd6;
	}

	:root[data-theme="slate"] {
		--accent: #6c93b8;
		--accent-hover: #80a3c4;
		--accent-active: #5a83a9;
		--accent-rgb: 108, 147, 184;
		--spotlight-b: #b87f6c;
		--spotlight-c: #8bb86c;
	}

/* Base typography */

	html {
		scroll-behavior: smooth;
		scroll-padding-top: calc(var(--navbar-height) - 1px);
	}

	/* No overflow-x on body: it would flip computed overflow-y to auto and break
	   Bootstrap ScrollSpy's scroll-root detection. Sections clip their own reveals. */
	body {
		background: var(--ink);
		font-family: 'Roboto', Helvetica, sans-serif;
		font-weight: 100;
		font-size: 1.25rem;
		line-height: 1.75;
		color: var(--fg);
	}

	body.has-fixed-navbar {
		padding-top: var(--navbar-height);
	}

	h1, h2, h3, h4, h5, h6 {
		font-weight: 300;
		color: var(--fg-bold);
		line-height: 1.25;
		margin: 0 0 1em 0;
	}

	h2 { font-size: 2em; letter-spacing: -0.025em; }
	h3 { font-size: 1.35em; }
	h4 { font-size: 1.1em; }

	p { margin: 0 0 1.5em 0; }

	a {
		color: var(--accent);
		text-decoration: none;
		border-bottom: dotted 1px;
		transition: border-color 0.2s ease-in-out, color 0.2s ease-in-out;
	}

		a:hover {
			border-bottom-color: transparent;
		}

	strong, b { color: var(--fg-bold); font-weight: 300; }

	blockquote {
		border-left: solid 0.5em var(--border-bg);
		padding: 0.5em 0 0.5em 2em;
		font-style: italic;
	}

	code {
		background: var(--border-bg);
		border-radius: 4px;
		font-family: 'Courier New', monospace;
		padding: 0.15em 0.5em;
	}

	pre {
		background: var(--border-bg);
		border-radius: 4px;
		font-family: 'Courier New', monospace;
		padding: 1em 1.5em;
		overflow-x: auto;
	}

		pre code { padding: 0; }

	.section-heading {
		text-align: center;
		margin: 0 0 4em 0;
		position: relative;
	}

		.section-heading:after {
			content: '';
			display: inline-block;
			height: 0.2em;
			max-width: 20em;
			width: 75%;
			background: var(--accent);
		}

	@media (max-width: 1680px) {
		body { font-size: 1.1rem; }
	}

	@media (max-width: 1280px) {
		body { font-size: 0.95rem; }
	}

/* Navbar */

	.site-navbar {
		min-height: var(--navbar-height);
		background: var(--panel-transparent);
		box-shadow: 0 0 0.25em 0 rgba(0, 0, 0, 0.25);
		font-size: 0.9rem;
	}

		.site-navbar.site-navbar-transparent {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			background: transparent;
			box-shadow: none;
			z-index: 30;
		}

		.site-navbar .site-logo {
			font-weight: 300;
			color: var(--fg-bold);
		}

		.site-navbar .nav-link {
			color: var(--fg);
		}

			.site-navbar .nav-link:hover,
			.site-navbar .nav-link.active {
				color: var(--accent);
			}

	/* Theme picker — seven accent swatches, reachable at every width: inline
	   in the navbar-collapse on desktop (lg and up, where the collapse is
	   always open), inside the collapsed panel on phones/tablets (below the
	   navbar-toggler breakpoint). The active swatch gets a white ring; each
	   swatch's fill is a static hex (not var(--accent)) so all seven stay
	   visible regardless of which theme is currently applied. */
	.theme-picker {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.6em;
		margin: 0;
		padding: 0.6em 0 0.6em 1em;
		list-style: none;
	}

		.theme-picker .theme-swatch {
			width: 1.15em;
			height: 1.15em;
			padding: 0;
			border: solid 2px var(--fg-lighter);
			border-radius: 50%;
			cursor: pointer;
			transition: border-color 0.25s ease-in-out, transform 0.25s ease-in-out;
		}

			.theme-picker .theme-swatch:hover,
			.theme-picker .theme-swatch:focus {
				border-color: var(--fg-light);
			}

			.theme-picker .theme-swatch.is-active {
				border-color: var(--fg-bold);
				transform: scale(1.15);
			}

			.theme-swatch[data-theme-choice="cyan"] { background-color: #55b8c4; }
			.theme-swatch[data-theme-choice="green"] { background-color: #59b377; }
			.theme-swatch[data-theme-choice="magenta"] { background-color: #e44c65; }
			.theme-swatch[data-theme-choice="amber"] { background-color: #d69a44; }
			.theme-swatch[data-theme-choice="violet"] { background-color: #9a7fd6; }
			.theme-swatch[data-theme-choice="crimson"] { background-color: #d64e6f; }
			.theme-swatch[data-theme-choice="slate"] { background-color: #6c93b8; }

	@media (max-width: 991.98px) {
		.site-navbar .navbar-collapse {
			background: var(--panel-transparent);
			margin-top: 0.5rem;
			border-radius: 4px;
			padding: 0.5rem 1rem;
		}

		.theme-picker {
			padding-left: 0;
			border-top: solid 1px var(--panel-hairline);
			margin-top: 0.5em;
			padding-top: 0.75em;
		}
	}

/* Nested dropdown (Layouts > Submenu) */

	.site-navbar .dropdown-menu {
		background: var(--panel-transparent);
		border: 0;
		border-radius: 4px;
		box-shadow: 0 0.075em 0.35em 0 rgba(0, 0, 0, 0.125);
		padding: 0.25em 0;
	}

		.site-navbar .dropdown-item {
			color: var(--fg);
			padding: 0.5em 1.25em;
		}

			.site-navbar .dropdown-item:hover,
			.site-navbar .dropdown-item:focus {
				background: var(--panel-hairline);
				color: var(--accent);
			}

			/* Current-page item: override Bootstrap's default blue
			   .dropdown-item.active fill with the theme accent instead. */
			.site-navbar .dropdown-item.active,
			.site-navbar .dropdown-item:active {
				background: var(--panel-hairline);
				color: var(--accent);
			}

	.nav-submenu {
		position: relative;
	}

		.nav-submenu > .dropdown-menu {
			display: none;
			position: absolute;
			top: 0;
			left: 100%;
			margin-left: 0.25em;
		}

			.nav-submenu > .dropdown-menu.show {
				display: block;
			}

		.nav-submenu > .nav-submenu-toggle:after {
			content: '\f105';
			font-family: 'Font Awesome 7 Free';
			font-weight: 900;
			float: right;
			margin-left: 1em;
		}

	@media (min-width: 992px) {
		/* Desktop convenience: hover also reveals the submenu. Click-toggle
		   (main.js) covers keyboard/touch and stays in sync via the .show class. */
		.nav-submenu:hover > .dropdown-menu {
			display: block;
		}
	}

	@media (max-width: 991.98px) {
		.nav-submenu > .dropdown-menu {
			position: static;
			left: auto;
			margin-left: 0;
			padding-left: 1em;
		}
	}

/* Banner (hero, index.html only) */

	.hero-banner {
		background-color: var(--panel);
		background-image: url("../../images/hero-banner.jpg");
		background-position: center center;
		background-size: cover;
		background-attachment: fixed;
		box-shadow: 0 0.25em 0.5em 0 rgba(0, 0, 0, 0.25);
		min-height: 100vh;
		position: relative;
	}

		.hero-banner:before {
			content: '';
			position: absolute;
			inset: 0;
			background-image: linear-gradient(var(--panel-transparent), var(--panel-transparent)), url("images/overlay.png");
		}

		.hero-banner .hero-content {
			position: relative;
			z-index: 1;
			max-width: 60em;
		}

		.hero-banner .hero-avatar {
			border-radius: 100%;
			overflow: hidden;
			width: 12em;
			height: 12em;
		}

			.hero-banner .hero-avatar img {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}

	@media (hover: none), (max-width: 767.98px) {
		.hero-banner { background-attachment: scroll; }
	}

/* Goto-next arrow */

	.goto-next {
		position: absolute;
		left: 50%;
		bottom: 1.5em;
		transform: translateX(-50%);
		width: 3em;
		height: 3em;
		z-index: 2;
	}

		.goto-next:before {
			content: '';
			display: block;
			width: 100%;
			height: 100%;
			background-image: url("images/arrow.svg");
			background-position: center center;
			background-repeat: no-repeat;
			background-size: contain;
		}

/* Spotlight panels */

	/* display:flex lets the inner .container stretch to the section's full
	   min-height-driven height — a bare .h-100 cannot resolve against min-height,
	   which collapsed the dock-left/right boxes to content height. */
	.spotlight-section {
		display: flex;
		position: relative;
		overflow: hidden;
		min-height: 100vh;
		background-color: var(--panel);
		background-position: center center;
		background-size: cover;
		background-attachment: fixed;
		box-shadow: 0 0.25em 0.5em 0 rgba(0, 0, 0, 0.25);
	}

		.spotlight-section:before {
			content: '';
			position: absolute;
			inset: 0;
			background-image: url("images/overlay.png");
		}

	@media (hover: none), (max-width: 767.98px) {
		.spotlight-section { background-attachment: scroll; }
	}

	/* Desktop background art per panel — original set this via JS from the
	   inline <img>'s src; a static rule is simpler and needs no inline style. */
	.spotlight-panel-1 { background-image: url("../../images/spotlight-panel-01.jpg"); }
	.spotlight-panel-2 { background-image: url("../../images/spotlight-panel-02.jpg"); }
	.spotlight-panel-3 { background-image: url("../../images/spotlight-panel-03.jpg"); }

	/* Mobile source image — hidden on desktop (CSS background carries the
	   photo instead), shown stacked above the content card on mobile. */
	.spotlight-source-image {
		display: none;
	}

	.spotlight-content {
		position: relative;
		z-index: 1;
		background: var(--panel-transparent);
		border-style: solid;
		border-color: var(--accent);
		padding: 3em 2em;
	}

		.spotlight-section.tone-b .spotlight-content { border-color: var(--spotlight-b); }
		.spotlight-section.tone-c .spotlight-content { border-color: var(--spotlight-c); }

		.spotlight-content.dock-bottom {
			position: absolute;
			left: 0;
			bottom: 0;
			border-top-width: 0.35em;
			width: 100%;
		}

		.spotlight-content.dock-left,
		.spotlight-content.dock-right {
			position: absolute;
			top: 0;
			height: 100%;
			max-width: 28em;
			display: flex;
			flex-direction: column;
			justify-content: center;
		}

			.spotlight-content.dock-left { left: 0; border-right-width: 0.35em; }
			.spotlight-content.dock-right { right: 0; border-left-width: 0.35em; }

		.spotlight-section .goto-next {
			transition: opacity 0.75s ease-in;
		}

	/* Below the "spotlight" desktop treatment: drop the fixed full-bleed
	   background, show the real <img> stacked above a static content card
	   (matches the original's medium-breakpoint fallback). */
	@media (max-width: 991.98px) {

		.spotlight-section {
			min-height: 0;
			background-image: none !important;
		}

			.spotlight-section .goto-next {
				display: none;
			}

		.spotlight-source-image {
			display: block;
			width: 100%;
			max-height: 40vh;
			object-fit: cover;
		}

		.spotlight-content,
		.spotlight-content.dock-bottom,
		.spotlight-content.dock-left,
		.spotlight-content.dock-right {
			position: static;
			display: block;
			width: 100%;
			max-width: none;
			height: auto;
			text-align: center;
			border-width: 0 !important;
			border-top-width: 0.35em !important;
		}

	}

/* Feature + CTA wrappers */

	.feature-wrapper {
		padding: 6em 0;
		overflow: hidden;
	}

	.cta-wrapper {
		padding: 6em 0;
		background: var(--accent);
		overflow: hidden;
	}

		.cta-wrapper .form-control {
			border-color: rgba(255, 255, 255, 0.3);
			color: var(--fg-bold);
		}

			.cta-wrapper .form-control:focus {
				border-color: rgba(255, 255, 255, 0.5);
				box-shadow: none;
			}

			.cta-wrapper .form-control::placeholder {
				color: rgba(255, 255, 255, 0.6);
			}

		.cta-wrapper .btn-accent {
			background: var(--fg-bold);
			color: var(--accent);
		}

			.cta-wrapper .btn-accent:hover {
				background: rgba(255, 255, 255, 0.075);
				box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
				color: var(--fg-bold);
			}

	.feature-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 4em;
		height: 4em;
		border-radius: 100%;
		background: var(--panel);
		font-size: 1.75rem;
		color: var(--fg);
		margin-bottom: 0.75em;
	}

/* Buttons */

	.btn-accent,
	.btn-ghost {
		border-radius: 4px;
		height: 3em;
		line-height: 3em;
		padding: 0 2.25em;
		font-weight: 300;
		display: inline-block;
		text-align: center;
		white-space: nowrap;
		text-decoration: none;
		transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
	}

	.btn-accent {
		background-color: var(--accent);
		border: 0;
		color: #fff;
	}

		.btn-accent:hover {
			background-color: var(--accent-hover);
			color: #fff;
		}

		.btn-accent:active {
			background-color: var(--accent-active);
			color: #fff;
		}

	.btn-ghost {
		background-color: transparent;
		box-shadow: inset 0 0 0 1px var(--border);
		color: var(--fg-bold);
	}

		.btn-ghost:hover {
			box-shadow: inset 0 0 0 1px var(--accent);
			color: var(--accent);
		}

		.btn-ghost:active {
			background-color: rgba(var(--accent-rgb), 0.15);
		}

	.btn-accent.disabled,
	.btn-ghost.disabled {
		background-color: var(--border);
		box-shadow: none;
		color: var(--fg-bold);
		cursor: default;
		opacity: 0.25;
	}

	.btn-sm-custom {
		height: 2.4em;
		line-height: 2.4em;
		padding: 0 1.5em;
		font-size: 0.8em;
	}

	.btn-lg-custom {
		font-size: 1.35em;
	}

	.action-list {
		list-style: none;
		margin: 0 0 1.5em 0;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 0.75em;
	}

		.action-list.action-list-vertical {
			flex-direction: column;
		}

		/* Horizontal "fit": buttons share the row width equally. */
		.action-list.action-list-fit:not(.action-list-vertical) .btn-accent,
		.action-list.action-list-fit:not(.action-list-vertical) .btn-ghost {
			flex: 1 1 0;
		}

		/* Vertical "fit": buttons stretch to the full column width. */
		.action-list.action-list-vertical.action-list-fit {
			align-items: stretch;
		}

/* Forms */

	label { color: var(--fg-bold); font-size: 0.9em; margin: 0 0 0.5em 0; display: block; }

	.form-control,
	.form-select {
		background: transparent;
		border-radius: 4px;
		border: solid 1px var(--border);
		color: var(--fg);
	}

		.form-control:focus,
		.form-select:focus {
			background: transparent;
			border-color: var(--accent);
			box-shadow: 0 0 0 0.25rem rgba(var(--accent-rgb), 0.25);
			color: var(--fg);
		}

		.form-control::placeholder {
			color: var(--fg-light);
		}

	.form-select option {
		background-color: var(--ink);
		color: var(--fg-bold);
	}

	.form-check-input {
		background-color: transparent;
		border-color: var(--border);
	}

		.form-check-input:checked {
			background-color: var(--fg-lighter);
			border-color: var(--border);
		}

		.form-check-input:focus {
			border-color: var(--accent);
			box-shadow: 0 0 0 0.25rem rgba(var(--accent-rgb), 0.25);
		}

	.form-check-label {
		color: var(--fg);
		font-weight: 100;
	}

/* Tables */

	.table {
		color: var(--fg);
	}

		.table > thead {
			border-bottom-color: var(--border);
		}

			.table > thead > tr > th {
				color: var(--fg-bold);
				font-weight: 300;
			}

		.table > tbody > tr {
			border-color: var(--border-bg);
		}

		.table-striped > tbody > tr:nth-of-type(odd) > * {
			background-color: var(--border-bg);
			color: var(--fg);
		}

		.table-bordered,
		.table-bordered > :not(caption) > * > * {
			border-color: var(--border);
		}

/* Images */

	.textured-image {
		position: relative;
		display: inline-block;
		border-radius: 4px;
		overflow: hidden;
	}

		.textured-image:before {
			content: '';
			position: absolute;
			inset: 0;
			background-image: url("images/overlay.png");
			z-index: 1;
		}

		.textured-image img {
			display: block;
			border-radius: 4px;
		}

/* Social/utility icon rows (elements page + footer) */

	.icon-row {
		list-style: none;
		margin: 0 0 1.5em 0;
		padding: 0;
		display: flex;
		gap: 0.5em;
	}

		.icon-row .icon-link {
			display: inline-flex;
			align-items: center;
			justify-content: center;
			width: 2.5em;
			height: 2.5em;
			border-radius: 100%;
			color: var(--fg);
			border-bottom: 0;
		}

			.icon-row .icon-link:hover {
				color: var(--accent);
			}

		.icon-row.icon-row-outline .icon-link {
			box-shadow: inset 0 0 0 1px var(--fg-light);
			color: var(--fg-bold);
		}

			.icon-row.icon-row-outline .icon-link:hover {
				box-shadow: inset 0 0 0 1px var(--accent);
				color: var(--accent);
			}

/* Sidebar layouts (left-sidebar / right-sidebar / no-sidebar) */

	.page-content-section {
		padding: 6em 0 4em 0;
	}

	.sidebar-block + .sidebar-block {
		margin-top: 2em;
		padding-top: 2em;
		border-top: solid 1px var(--border-bg);
	}

	.article-body ul {
		list-style: disc;
		padding-left: 1.5em;
		margin: 0 0 1.5em 0;
	}

/* Footer */

	.site-footer {
		background: var(--panel);
		color: var(--fg-light);
		padding: 4em 0;
		text-align: center;
	}

		.site-footer .icon-row {
			justify-content: center;
			margin-bottom: 2em;
		}

		.site-footer .copyright-list {
			list-style: none;
			margin: 0;
			padding: 0;
			font-size: 0.8em;
		}

			.site-footer .copyright-list li {
				display: inline-block;
				border-left: solid 1px var(--border);
				margin-left: 1.5em;
				padding-left: 1.5em;
			}

			.site-footer .copyright-list li:first-child {
				border-left: 0;
				margin-left: 0;
				padding-left: 0;
			}

			.site-footer .copyright-list a {
				color: inherit;
			}

/* Reveal-on-scroll (scrollex replacement; JS toggles .is-visible) */

	@media (prefers-reduced-motion: no-preference) {

		[data-reveal] {
			transition: opacity 1s ease, transform 1s ease;
		}

		[data-reveal]:not(.is-visible) {
			opacity: 0;
		}

		[data-reveal="from-top"]:not(.is-visible) { transform: translateY(-5em); }
		[data-reveal="from-bottom"]:not(.is-visible) { transform: translateY(5em); }
		[data-reveal="from-left"]:not(.is-visible) { transform: translateX(-5em); }
		[data-reveal="from-right"]:not(.is-visible) { transform: translateX(5em); }
		[data-reveal="fade-up"]:not(.is-visible) { transform: translateY(1em); }
		[data-reveal="fade"]:not(.is-visible) { transform: none; }

	}
