/**
 * OGC NewFinity — real 3D surfaces (see assets/js/ogc-3d.js).
 * Default = flat glass look (no WebGL / no JS). With JS the <html> gets .ogc-3d-on and
 * the solids are drawn by WebGL behind the HTML, so these boxes turn transparent.
 */

.ogc-3d-canvas {
	position: fixed;
	left: 0;
	top: 0;
	pointer-events: none;
	z-index: 0;
}

/* Cards ------------------------------------------------------------------- */

.ogc-3d-card {
	position: relative;
	min-width: 0;
	background: rgba(20, 20, 20, 0.2);
	border: 1px solid rgba(var(--ogc-brand-rgb), 0.15);
	border-radius: var(--ogc-radius);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.ogc-3d-card > .ogc-3d__in {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	height: 100%;
	padding: 1.75rem 1.6rem;
}

.ogc-3d-card h3 {
	margin: 0.35rem 0 0;
	font-family: var(--ogc-font-heading);
	font-size: 1.12rem;
}

.ogc-3d-card p {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--ogc-text-muted);
}

.ogc-3d-on .ogc-3d-card,
.ogc-3d-on .ogc-3d-card.glass-card {
	background: none;
	border-color: transparent;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

/* Tiles + orbs ------------------------------------------------------------ */

.ogc-3d-tile,
.ogc-3d-orb {
	position: relative;
	display: block;
	flex: none;
}

.ogc-3d-tile { width: 52px; height: 52px; border: 1px solid rgba(var(--ogc-brand-rgb), 0.4); border-radius: 12px; background: rgba(var(--ogc-brand-rgb), 0.08); }
.ogc-3d-orb { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff3d6, #ffd27a 45%, #b07a1e); }

.ogc-3d-tile > .ogc-3d__in,
.ogc-3d-orb > .ogc-3d__in {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ogc-3d-tile > .ogc-3d__in { color: var(--ogc-link-color); }
.ogc-3d-orb > .ogc-3d__in { color: #1a1200; font-weight: 800; font-size: 1.15rem; }

.ogc-3d-on .ogc-3d-tile,
.ogc-3d-on .ogc-3d-orb {
	background: none;
	border-color: transparent;
}

/* Buttons ----------------------------------------------------------------- */

.ogc-btn--3d {
	position: relative;
	width: 230px;
	max-width: 100%;
	height: 58px;
	padding: 0;
	text-decoration: none;
}

.ogc-btn--3d > .ogc-3d__in {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1rem;
	pointer-events: none;
}

.ogc-3d-on .ogc-btn--3d {
	background: none;
	border: 0;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	overflow: visible;
}

.ogc-3d-on .ogc-btn--3d::before,
.ogc-3d-on .ogc-btn--3d::after { display: none; }

.ogc-3d-on .ogc-btn--3d > .ogc-3d__in { color: #1a1200; }
.ogc-3d-on .ogc-btn--3d-dark > .ogc-3d__in { color: var(--ogc-link-color); }

.ogc-btn--3d:focus-visible { outline: 2px solid var(--ogc-link-color); outline-offset: 6px; }

@media (prefers-reduced-motion: reduce) {
	.ogc-3d-card > .ogc-3d__in,
	.ogc-3d-tile > .ogc-3d__in,
	.ogc-3d-orb > .ogc-3d__in,
	.ogc-btn--3d > .ogc-3d__in { transform: none !important; }
}

/* --------------------------------------------------------------------------
   Design-system overrides (automatic surfaces: see assets/js/ogc-3d.js).
   Applied only when WebGL is running (.ogc-3d-on) so there is always a fallback.
   -------------------------------------------------------------------------- */

.ogc-3d-on [data-ogc-3d="card"],
.ogc-3d-on [data-ogc-3d="card"]:hover,
.ogc-3d-on [data-ogc-3d="card"]:focus-within {
	background: none !important;
	border-color: transparent !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	transform: none !important;
}

.ogc-3d-on [data-ogc-3d="button"],
.ogc-3d-on [data-ogc-3d="button"]:hover,
.ogc-3d-on [data-ogc-3d="button"]:focus-visible,
.ogc-3d-on [data-ogc-3d="button"]:active {
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	transform: none !important;
	filter: none !important;
	overflow: visible;
}

.ogc-3d-on [data-ogc-3d="button"]::before,
.ogc-3d-on [data-ogc-3d="button"]::after { display: none !important; }

.ogc-3d-on [data-ogc-3d="button"][data-ogc-3d-tone="primary"],
.ogc-3d-on [data-ogc-3d="button"][data-ogc-3d-tone="primary"]:hover,
.ogc-3d-on [data-ogc-3d="button"][data-ogc-3d-tone="primary"]:focus-visible { color: #1a1200 !important; }

.ogc-3d-on [data-ogc-3d="button"][data-ogc-3d-tone="dark"],
.ogc-3d-on [data-ogc-3d="button"][data-ogc-3d-tone="dark"]:hover,
.ogc-3d-on [data-ogc-3d="button"][data-ogc-3d-tone="dark"]:focus-visible { color: var(--ogc-link-color) !important; }

.ogc-3d-on [data-ogc-3d="button"] { min-height: 2.6rem; padding-left: 1.3rem; padding-right: 1.3rem; }
.ogc-3d-on [data-ogc-3d="button"].ogc-btn--sm { min-height: 2.1rem; padding-left: 0.9rem; padding-right: 0.9rem; }

.ogc-3d-on [data-ogc-3d="field"],
.ogc-3d-on [data-ogc-3d="field"]:hover,
.ogc-3d-on [data-ogc-3d="field"]:focus {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	min-height: 3rem;
	padding-left: 1.1rem !important;
	padding-right: 1.1rem !important;
}

.ogc-3d-on select[data-ogc-3d="field"] { padding-right: 2.4rem !important; }
.ogc-3d-on [data-ogc-3d="field"]:focus-visible { outline: 1px solid rgba(var(--ogc-brand-rgb), 0.45); outline-offset: 3px; border-radius: 14px; }

/* Tight grids of 3D buttons need room for the bevel. */
.ogc-3d-on .ogc-service-tags { gap: 1.1rem 1.25rem; }
