/*
 * Page not found (404.php, content in Theme Settings → Page not found).
 *
 * A giant "404" cut out of one of the firm's interiors (background-clip: text, drifting slowly), the heading
 * and actions beside it, then three photo tiles. Desktop: two columns under the absolute header; ≤1024 the
 * numbers sit above the text; ≤767 one column, full-width buttons, tiles as wide cards.
 */
.sg-nf { background: var(--c-bg); color: var(--c-light); overflow: hidden; }

.sg-nf__hero {
	display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: 70px;
	max-width: calc(1290px + 2 * var(--gutter)); min-height: min(100svh, 980px); margin: 0 auto;
	padding: calc(var(--header-h) + 70px) var(--gutter) 90px;
}

/* The numbers: the photo shows through the letters; a hairline outline keeps their shape on dark areas.
   Sized from their own column (the "404" is ~1.92× its font size wide), so they fill about 80% of it and never
   reach the text beside them; at most 300px. The vw size is only for browsers without container units. */
.sg-nf__art { min-width: 0; text-align: center; container-type: inline-size; }
.sg-nf__code {
	display: inline-block; font-size: clamp(120px, 17vw, 300px); font-weight: 700; line-height: .8;
	letter-spacing: -.045em; color: var(--c-white); user-select: none;
}
@supports (font-size: 1cqi) { .sg-nf__code { font-size: min(300px, 42cqi); } }
.sg-nf__code.has-photo {
	background: var(--sg-nf-photo) 30% 50% / 150% auto no-repeat;
	-webkit-background-clip: text; background-clip: text;
	color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .22);
	animation: sgNfDrift 26s ease-in-out infinite alternate;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
	.sg-nf__code.has-photo { background: none; color: var(--c-white); -webkit-text-stroke: 0; }
}
@keyframes sgNfDrift { from { background-position: 22% 50%; } to { background-position: 78% 50%; } }

.sg-nf__body { min-width: 0; max-width: 560px; }
.sg-nf__eyebrow {
	margin: 0 0 22px; color: var(--c-accent);
	font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: .32em; text-transform: uppercase;
}
.sg-nf__title { margin: 0; color: var(--c-white); font-size: 50px; font-weight: 500; line-height: 1.2; text-wrap: balance; }
.sg-nf__text { margin-top: 26px; color: var(--c-grey); font-size: 17px; }
.sg-nf__text p { line-height: 1.9; }
.sg-nf__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 42px; }
.sg-nf__actions .sg-btn { min-height: 52px; padding: 17px 34px; font-size: 15px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.sg-nf__actions .sg-nf__consult { border-color: var(--c-white); color: var(--c-white); }
.sg-nf__actions .sg-nf__consult:hover, .sg-nf__actions .sg-nf__consult:focus-visible { background: var(--c-white); color: #000; }

/* Search: the site's form-field look (transparent, white type, #4C4C4C line). */
.sg-nf__search {
	display: flex; align-items: center; gap: 12px; max-width: 460px; margin-top: 46px;
	border-bottom: 1px solid var(--c-field); transition: border-color var(--t);
}
.sg-nf__search:focus-within { border-bottom-color: var(--c-white); }
.sg-nf__search-icon { display: flex; color: #8B8E92; }
.sg-nf__search-input {
	flex: 1 1 auto; min-width: 0; height: 52px; padding: 0; border: 0; border-radius: 0;
	background: transparent; color: var(--c-white); font: inherit; font-size: 16px; outline: none;
	-webkit-appearance: none; appearance: none;
}
.sg-nf__search-input::placeholder { color: #8B8E92; opacity: 1; }
.sg-nf__search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sg-nf__search-btn {
	display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px;
	padding: 0; border: 0; background: none; color: var(--c-white); cursor: pointer; transition: transform var(--t);
}
.sg-nf__search-btn:hover, .sg-nf__search-btn:focus-visible { transform: translateX(4px); }

/* Tiles. */
.sg-nf__links { max-width: calc(1290px + 2 * var(--gutter)); margin: 0 auto; padding: 30px var(--gutter) 150px; }
.sg-nf__links-title {
	display: flex; align-items: center; gap: 30px; margin: 0 0 40px;
	color: var(--c-white); font-size: 35px; font-weight: 500; line-height: 1.2;
}
.sg-nf__links-title::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--c-line); }
.sg-nf__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin: 0; padding: 0; list-style: none; }
.sg-nf__tile-link { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--c-surface); color: var(--c-white); }
.sg-nf__tile-link::after {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .18) 45%, rgba(0, 0, 0, .05) 100%);
	transition: opacity .6s var(--ease);
}
.sg-nf__tile-img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.sg-nf__tile-label {
	position: absolute; left: 30px; right: 30px; bottom: 28px; z-index: 2;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	font-size: 22px; font-weight: 500; line-height: 1.2;
}
.sg-nf__tile-label svg { flex: 0 0 auto; transition: transform var(--t); }
.sg-nf__tile-link:hover .sg-nf__tile-img, .sg-nf__tile-link:focus-visible .sg-nf__tile-img { transform: scale(1.06); }
.sg-nf__tile-link:hover::after, .sg-nf__tile-link:focus-visible::after { opacity: .8; }
.sg-nf__tile-link:hover .sg-nf__tile-label svg, .sg-nf__tile-link:focus-visible .sg-nf__tile-label svg { transform: translateX(6px); }

@media (max-width: 1280px) {
	.sg-nf__hero { gap: 50px; }
	.sg-nf__title { font-size: 40px; }
	.sg-nf__links-title { font-size: 30px; }
}
@media (max-width: 1024px) {
	.sg-nf__hero { grid-template-columns: minmax(0, 1fr); gap: 50px; min-height: 0; padding: 70px 40px 80px; }
	.sg-nf__body { max-width: 640px; margin: 0 auto; text-align: center; }
	.sg-nf__actions { justify-content: center; }
	.sg-nf__search { margin-left: auto; margin-right: auto; }
	.sg-nf__links { padding: 10px 40px 100px; }
	.sg-nf__tiles { gap: 20px; }
	.sg-nf__tile-label { left: 20px; right: 20px; bottom: 20px; font-size: 18px; }
}
@media (max-width: 767px) {
	.sg-nf__hero { gap: 36px; padding: 50px 20px 60px; }
	.sg-nf__eyebrow { margin-bottom: 16px; font-size: 12px; letter-spacing: .26em; }
	.sg-nf__title { font-size: 32px; }
	.sg-nf__text { margin-top: 20px; font-size: 16px; }
	.sg-nf__actions { flex-direction: column; gap: 12px; margin-top: 32px; }
	.sg-nf__actions .sg-btn { width: 100%; }
	.sg-nf__search { margin-top: 34px; }
	.sg-nf__links { padding: 0 20px 70px; }
	.sg-nf__links-title { gap: 20px; margin-bottom: 24px; font-size: 26px; }
	.sg-nf__tiles { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.sg-nf__tile-link { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
	.sg-nf__code.has-photo { animation: none; background-position: 50% 50%; }
	.sg-nf__tile-img, .sg-nf__tile-label svg, .sg-nf__search-btn { transition: none; }
}
