/*
Theme Name: Former Glory
Author: FG Engineering & Development
Description: Block theme for Former Glory (FG Engineering & Development): custom retrofit parts, dashboards, control panels, and electrical and mechanical solutions, made by hand in Copenhagen. Every section is built from editable blocks.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.11.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: former-glory
Tags: full-site-editing, block-patterns, one-column, custom-colors, editor-style, dark
*/

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

[id] {
	scroll-margin-top: 24px;
}

/* Sections sit flush against each other. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

:where(a, button, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* ---------- Section bands and boxes ---------- */

.fg-band {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.fg-band-top {
	border-top: 1px solid var(--wp--preset--color--line);
}

.fg-band-bottom {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.wp-block-column.fg-card {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	padding: 32px 28px;
}

@media (min-width: 782px) {
	.wp-block-column.fg-card {
		min-height: 260px;
	}
}

/* On phones: the menu button sits next to the logo, Contact is in the menu flow below. */
@media (max-width: 599px) {
	.wp-block-buttons.fg-header-cta {
		display: none !important;
	}
}

@media (min-width: 600px) {
	.fg-nav-contact {
		display: none !important;
	}
}

@media (max-width: 781px) {
	.fg-strip.wp-block-group {
		justify-content: flex-start;
	}
}

.fg-outline {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	padding: 36px;
}

.fg-step {
	border-top: 2px solid var(--wp--preset--color--line);
	padding-top: 24px;
}

.fg-fact {
	border-top: 1px solid var(--wp--preset--color--line-strong);
	padding-top: 16px;
}

.fg-card h3,
.fg-step h3 {
	margin-top: 8px;
}

/* ---------- Small text styles ---------- */

.is-style-fg-kicker {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.is-style-fg-meta {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.fg-dot::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 10px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	vertical-align: 0.1em;
}

.fg-number {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	line-height: 1;
}

.fg-fact-value,
.fg-caption-title {
	font-family: var(--wp--preset--font-family--display);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.1;
	text-transform: uppercase;
}

.fg-strip {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-soft);
}

.fg-narrow {
	max-width: 620px;
}

.fg-lead-narrow {
	max-width: 560px;
}

/* ---------- Footer name and details ---------- */

.fg-footer-name {
	font-family: var(--wp--preset--font-family--display);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0.05em;
	line-height: 1;
	text-transform: uppercase;
}

.fg-footer-sub {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.fg-footer-meta {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
}

.fg-proof .fg-number {
	text-transform: uppercase;
}

/* Project status label: "Built", "In development", ... */
.fg-status {
	display: block;
	width: fit-content;
	padding: 5px 11px;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.12em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-soft);
}

.fg-status.fg-status-dev {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.fg-status.fg-status-dev::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 8px;
	border-radius: 50%;
	background: currentColor;
	vertical-align: 0.12em;
}

/* Call-to-action strip under the service cards */
.fg-lead-display {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(24px, 2.6vw, 30px);
	font-weight: 600;
	line-height: 1.1;
	text-transform: uppercase;
}

.fg-cta-strip > p {
	flex: 1 1 420px;
	max-width: 760px;
	margin: 0;
}

.fg-link-accent {
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--text-soft);
}

.fg-link-accent a {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.fg-link-accent a:hover {
	color: var(--wp--preset--color--text);
}

/* ---------- Brand mark ---------- */

.fg-mark {
	margin: 0;
	line-height: 1;
}

.fg-mark a {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	border: 1.5px solid var(--wp--preset--color--accent);
	border-radius: 6px;
	font-family: var(--wp--preset--font-family--display);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.fg-mark a:hover {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ground);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--display);
	font-size: 30px;
	font-weight: 600;
	text-transform: uppercase;
}

/*
 * Name lockup: "ENGINEERING" over "& DEVELOPMENT".
 * The first line gets extra letter-spacing so both lines are exactly as wide,
 * and a tiny negative indent so their left edges line up.
 */
.fg-header-name {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.05em;
	line-height: 1.02;
	text-transform: uppercase;
	text-indent: -0.025em;
	white-space: nowrap;
}

.fg-header-name::first-line {
	letter-spacing: 0.184em;
}


.fg-header-name a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.fg-header-name a:hover {
	color: var(--wp--preset--color--accent);
}

.wp-block-site-title a {
	text-decoration: none;
}

/* ---------- Illustration and icons ---------- */

.fg-gauge {
	display: flex;
	justify-content: center;
}

.fg-gauge svg {
	display: block;
	width: 100%;
	max-width: 460px;
	height: auto;
}

.fg-icon svg {
	display: block;
	width: 28px;
	height: 28px;
}

/* ---------- Contact ---------- */

.fg-email {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(30px, 4.5vw, 56px);
	font-weight: 600;
	line-height: 1.1;
}

.fg-email a {
	display: inline-block;
	max-width: 100%;
	padding-bottom: 8px;
	border-bottom: 2px solid currentColor;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.fg-email a:hover {
	color: var(--wp--preset--color--text);
}

.fg-checklist {
	list-style: none;
	padding-left: 0;
}

.fg-checklist li {
	position: relative;
	padding-left: 22px;
}

.fg-checklist li + li {
	margin-top: 12px;
}

.fg-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 8px;
	height: 8px;
	background: var(--wp--preset--color--accent);
}

/* List with small round accent dots (packaging benefits). */
.fg-dots {
	list-style: none;
	margin-top: 8px;
	padding-left: 0;
}

.fg-dots li {
	position: relative;
	padding-left: 22px;
	font-size: 18px;
	line-height: 1.5;
	color: var(--wp--preset--color--text);
}

.fg-dots li + li {
	margin-top: 10px;
}

.fg-dots li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.6em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
}

/* ---------- Images ---------- */

.fg-photo img {
	border-radius: 6px;
}

/* ---------- Rotating 3D packaging box ---------- */

@property --fg-ry {
	syntax: "<angle>";
	inherits: false;
	initial-value: -28deg;
}

@keyframes fg-box-spin {
	from { --fg-ry: -28deg; }
	to { --fg-ry: 332deg; }
}

.fg-box-stage {
	--fg-s: 1;
	position: relative;
	height: calc(560px * var(--fg-s));
	display: flex;
	align-items: center;
	justify-content: center;
	perspective: 1800px;
	cursor: grab;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
	background: radial-gradient(ellipse 48% 46% at 50% 56%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 100%);
}

.fg-box-stage.is-dragging {
	cursor: grabbing;
}

.fg-box3d {
	--fg-rx: -24deg;
	--fg-drag: 0deg;
	position: relative;
	width: 0;
	height: 0;
	transform-style: preserve-3d;
	transform: scale(var(--fg-s)) rotateX(var(--fg-rx)) rotateY(calc(var(--fg-ry) + var(--fg-drag)));
	animation: fg-box-spin 40s linear infinite;
}

.fg-box-stage.is-dragging .fg-box3d,
.fg-box-stage.is-offscreen .fg-box3d {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	.fg-box3d {
		animation: none;
	}
}

@media (max-width: 1100px) {
	.fg-box-stage { --fg-s: 0.85; }
}

@media (max-width: 860px) {
	.fg-box-stage { --fg-s: 0.68; }
}

@media (max-width: 640px) {
	.fg-box-stage { --fg-s: 0.5; }
}

@media (max-width: 400px) {
	.fg-box-stage { --fg-s: 0.44; }
}

.fg-box-face {
	position: absolute;
	box-sizing: border-box;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
}

/* Soft lighting on each face, so the flat panels read as printed board. */
.fg-box-face::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.fg-box-top {
	left: -300px;
	top: -160px;
	width: 600px;
	height: 320px;
	transform: rotateX(90deg) translateZ(80px);
	background: #16171b;
	border: 1px solid #23242a;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.fg-box-top::after {
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 55%);
}

.fg-box-top-l1,
.fg-box-top-l2 {
	font-weight: 800;
	font-size: 74px;
	line-height: 0.9;
	letter-spacing: 0.01em;
	color: #ece8e0;
}

.fg-box-top-l2 {
	color: #d4a03c;
}

.fg-box-top-lockup {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
}

.fg-box-top-mark {
	width: 30px;
	height: 30px;
	box-sizing: border-box;
	border: 1.5px solid #d4a03c;
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 15px;
	color: #d4a03c;
}

.fg-box-top-name {
	font-weight: 600;
	font-size: 11px;
	line-height: 1.05;
	letter-spacing: 0.28em;
	color: #ece8e0;
}

.fg-box-front {
	left: -300px;
	top: -80px;
	width: 600px;
	height: 160px;
	transform: translateZ(160px);
	background: #ece8e0;
	color: #16171b;
	display: flex;
	flex-direction: column;
}

.fg-box-front::after {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.07) 100%);
}

.fg-box-rim {
	height: 14px;
	background: #16171b;
}

.fg-box-front-main {
	flex: 1;
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 22px;
	padding: 0 26px;
}

.fg-box-front-mark {
	width: 58px;
	height: 58px;
	box-sizing: border-box;
	border: 2px solid #16171b;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 28px;
}

.fg-box-front-title {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.fg-box-front-h {
	font-weight: 800;
	font-size: 36px;
	line-height: 0.9;
	white-space: nowrap;
	letter-spacing: 0.01em;
}

.fg-box-front-sub {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 20px;
	letter-spacing: 0.22em;
}

.fg-box-dash {
	width: 28px;
	height: 4px;
	background: #d4a03c;
}

.fg-box-front-foot {
	padding: 0 26px 10px;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	font-family: "JetBrains Mono", ui-monospace, monospace;
	color: #3a3a3a;
}

.fg-box-front-foot > :first-child {
	font-size: 8px;
	letter-spacing: 0.24em;
}

.fg-box-front-fits {
	font-size: 7px;
	line-height: 1.6;
	letter-spacing: 0.08em;
	text-align: right;
}

.fg-box-right,
.fg-box-left {
	left: -160px;
	top: -80px;
	width: 320px;
	height: 160px;
	background: #16171b;
	border: 1px solid #23242a;
}

.fg-box-right {
	transform: rotateY(90deg) translateZ(300px);
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.fg-box-left {
	transform: rotateY(-90deg) translateZ(300px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.fg-box-right::after,
.fg-box-left::after,
.fg-box-back::after {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.22) 100%);
}

.fg-box-right-title {
	font-weight: 800;
	font-size: 26px;
	line-height: 0.95;
	color: #d4a03c;
}

.fg-box-right-list {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 8px;
	line-height: 1.8;
	letter-spacing: 0.1em;
	color: #c9c4b8;
}

.fg-box-left-mark {
	font-weight: 800;
	font-size: 34px;
	letter-spacing: 0.04em;
	color: #d4a03c;
}

.fg-box-back {
	left: -300px;
	top: -80px;
	width: 600px;
	height: 160px;
	transform: rotateY(180deg) translateZ(160px);
	background: #16171b;
	border: 1px solid #23242a;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fg-box-back-line {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 10px;
	letter-spacing: 0.3em;
	color: #c9c4b8;
}

.fg-box-shadow {
	position: absolute;
	left: -320px;
	top: -180px;
	width: 640px;
	height: 360px;
	transform: rotateX(90deg) translateZ(-90px);
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 70%);
	pointer-events: none;
}

/* ---------- Product price box ---------- */

.fg-price {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(52px, 6vw, 72px);
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--accent);
}

.fg-price-box {
	background: var(--wp--preset--color--surface);
}

.fg-price-box .fg-dots {
	margin-top: 0;
}

@media (min-width: 782px) {
	.fg-price-cta.wp-block-buttons {
		justify-content: flex-end;
	}
}
