/**
 * OGC NewFinity — base layout, global links, shared buttons.
 * Header/footer chrome live in header.css / footer.css.
 * Tokens: style.css (:root). Prefix: .ogc-
 */

/* Content sits above the fixed background layer */
.ogc-site-header,
.ogc-main,
.ogc-footer {
	position: relative;
	z-index: 1;
}

.ogc-site-header {
	z-index: 1000;
}

/* --------------------------------------------------------------------------
   Shared button (.ogc-btn) — embossed / glossy chip; reuse everywhere
   -------------------------------------------------------------------------- */

.ogc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.15rem;
	font-family: var(--ogc-font-body);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	color: #ffffff;
	background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
	border: 1px solid rgba(var(--ogc-brand-rgb), 0.5);
	border-radius: var(--ogc-radius);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.08),
		0 2px 6px rgba(0, 0, 0, 0.4);
	transition:
		box-shadow 0.2s ease,
		transform 0.2s ease,
		border-color 0.2s ease,
		background 0.2s ease,
		color 0.2s ease;
}

.ogc-btn:hover,
.ogc-btn:focus-visible {
	color: #ffffff;
	border-color: rgba(var(--ogc-brand-hover-rgb), 0.9);
	background: linear-gradient(145deg, #1f1f1f, #101010);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.1),
		0 4px 12px rgba(0, 0, 0, 0.55);
	transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
	.ogc-btn:hover,
	.ogc-btn:focus-visible {
		transform: none;
	}
}

.ogc-btn--sm {
	padding: 0.4rem 0.75rem;
	font-size: 0.75rem;
}

.ogc-btn.is-active,
.ogc-btn[aria-pressed='true'] {
	color: var(--ogc-text-on-accent);
	background: linear-gradient(
		90deg,
		var(--ogc-accent-start),
		var(--ogc-accent-end)
	);
	border-color: rgba(var(--ogc-brand-rgb), 0.85);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.35),
		0 2px 8px rgba(0, 0, 0, 0.35);
}

.ogc-btn.is-active:hover,
.ogc-btn.is-active:focus-visible,
.ogc-btn[aria-pressed='true']:hover,
.ogc-btn[aria-pressed='true']:focus-visible {
	color: var(--ogc-text-on-accent);
	background: linear-gradient(
		90deg,
		var(--ogc-accent-start),
		var(--ogc-accent-end)
	);
	border-color: rgba(var(--ogc-brand-hover-rgb), 0.95);
	transform: none;
}

/* --------------------------------------------------------------------------
   Back to top (site-wide) — circular embossed chip
   -------------------------------------------------------------------------- */

.ogc-back-top {
	position: fixed;
	right: 1.15rem;
	bottom: 1.15rem;
	z-index: 900;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	border: 1px solid rgba(var(--ogc-brand-rgb), 0.5);
	background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.08),
		0 2px 6px rgba(0, 0, 0, 0.4);
	color: #ffffff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	pointer-events: none;
	transition:
		opacity 0.2s ease,
		visibility 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease,
		border-color 0.2s ease,
		background 0.2s ease,
		color 0.2s ease;
}

.ogc-back-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.ogc-back-top:hover,
.ogc-back-top:focus-visible {
	color: #ffffff;
	border-color: rgba(var(--ogc-brand-hover-rgb), 0.9);
	background: linear-gradient(145deg, #1f1f1f, #101010);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.1),
		0 4px 12px rgba(0, 0, 0, 0.55);
	transform: translateY(-1px);
}

.ogc-back-top.is-visible:hover,
.ogc-back-top.is-visible:focus-visible {
	transform: translateY(-1px);
}

.ogc-back-top svg {
	display: block;
	width: 18px;
	height: 18px;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

@media (max-width: 599px) {
	.ogc-back-top {
		right: 0.85rem;
		bottom: 0.85rem;
		width: 42px;
		height: 42px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ogc-back-top,
	.ogc-back-top.is-visible,
	.ogc-back-top:hover,
	.ogc-back-top:focus-visible,
	.ogc-back-top.is-visible:hover,
	.ogc-back-top.is-visible:focus-visible {
		transition: opacity 0.15s ease, visibility 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
		transform: none;
	}
}

/* --------------------------------------------------------------------------
   Content area
   -------------------------------------------------------------------------- */

.ogc-main {
	min-height: 50vh;
	max-width: var(--ogc-container);
	margin: 0 auto;
	padding: 3rem 1.25rem;
	flex: 1 0 auto;
}

.ogc-entry {
	margin-bottom: 2.5rem;
}

.ogc-entry__title {
	font-family: var(--ogc-font-heading);
	font-style: normal;
	font-weight: 700;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	color: var(--ogc-text-primary);
	margin: 0 0 1rem;
}

.ogc-entry__title a {
	color: var(--ogc-link-color);
}

.ogc-entry__title a:hover,
.ogc-entry__title a:focus-visible {
	color: var(--ogc-link-hover);
}

.ogc-entry__content {
	color: var(--ogc-text-primary);
	font-family: var(--ogc-font-body);
}

.ogc-entry__content a {
	color: var(--ogc-link-color);
}

.ogc-entry__content a:hover,
.ogc-entry__content a:focus-visible {
	color: var(--ogc-link-hover);
}

.ogc-no-posts {
	color: var(--ogc-text-primary);
}

/* Pagination / breadcrumbs (future templates) */
.ogc-pagination a,
.ogc-breadcrumbs a,
.navigation a,
.page-links a {
	color: var(--ogc-link-color);
}

.ogc-pagination a:hover,
.ogc-pagination a:focus-visible,
.ogc-breadcrumbs a:hover,
.ogc-breadcrumbs a:focus-visible,
.navigation a:hover,
.navigation a:focus-visible,
.page-links a:hover,
.page-links a:focus-visible {
	color: var(--ogc-link-hover);
}

/* Sticky footer layout when page is short */
body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
