/*
 * Gabriel Klimatechnik 2026 — brand layer.
 * Everything theme.json cannot express. Tokens come in as --wp--preset--* /
 * --wp--custom--* custom properties; no raw hex values in here except inside
 * the two data-URI SVG textures.
 */

/* ---------- global ---------- */

body {
	font-variant-numeric: tabular-nums;
	overflow-x: clip; /* nothing may cause horizontal scroll; clip keeps sticky working */
}

:where(a, button, [role="button"], input, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--eis-300);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection {
	background: var(--wp--preset--color--eis-500);
	color: var(--wp--preset--color--nacht-900);
}

/* ---------- hex texture (brand asset b) ---------- */

.gab-hex {
	position: relative;
}

.gab-hex::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.05;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cg fill='none' stroke='%2338B6E8' stroke-width='1'%3E%3Cpath d='M28 0L56 16v32L28 64 0 48V16z'/%3E%3Cpath d='M28 64l28 16v17M28 64L0 80v17'/%3E%3C/g%3E%3C/svg%3E");
	background-size: 56px 97px;
}

.gab-hex > * {
	position: relative;
}

/* ---------- energy lines (brand asset c) — divider motif ---------- */

.gab-energy {
	height: 2px;
	background: var(--wp--preset--color--eis-500);
	opacity: 0.35;
}

/* ---------- typography devices ---------- */

/* Two-tone heading: last word cyan — dark bands only (pattern markup adds the span). */
.gab-accent {
	color: var(--wp--preset--color--eis-500);
}

.gab-eyebrow {
	font-family: var(--wp--preset--font-family--mono) !important;
	font-size: var(--wp--preset--font-size--eyebrow);
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--tracking--eyebrow);
	color: var(--wp--preset--color--eis-600);
}

.gab-on-dark .gab-eyebrow {
	color: var(--wp--preset--color--eis-500);
}

.gab-on-dark h1,
.gab-on-dark h2,
.gab-on-dark h3 {
	color: var(--wp--preset--color--weiss);
}

.gab-mono {
	font-family: var(--wp--preset--font-family--mono) !important;
}

/* ---------- header ---------- */

/* Sticky must live on the template-part wrapper — the inner group has no
   room to travel inside a wrapper of its own height. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}

.gab-header {
	border-bottom: 1px solid var(--wp--custom--hairline--dunkel);
}

/* Header row matches the hero's wider grid; nav stays on one line. */
.gab-header > .wp-block-group.alignwide {
	max-width: min(1360px, calc(100% - 48px));
}

.gab-header .wp-block-navigation-item {
	white-space: nowrap;
}

.gab-logo-mark svg {
	width: 36px;
	height: 36px;
	display: block;
}

.gab-wordmark {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	font-size: 1.02rem;
	line-height: 1.25;
}

.gab-wordmark .w1 { color: var(--wp--preset--color--weiss); }
.gab-wordmark .w2 { color: var(--wp--preset--color--eis-500); }

/* Core nav CSS forces `color: inherit` at (0,3,0) specificity — these
   selectors must stay at (0,3,1)+ or the links silently go body-color. */
.gab-header .wp-block-navigation a.wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--tracking--nav);
	color: var(--wp--preset--color--eis-100);
}

.gab-header .wp-block-navigation a.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--eis-300);
	text-decoration: none;
}

/* Current page: cyan underline marker. */
.gab-header .wp-block-navigation a.wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--eis-300);
	text-decoration: underline;
	text-underline-offset: 8px;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--wp--preset--color--eis-500);
}

.gab-header .wp-block-navigation__container {
	gap: 22px;
}

/* Core switches to the overlay menu only below 600px; with 7 items the
   row needs ~1150px, so tablets get the hamburger too. */
@media (max-width: 1149px) {
	.gab-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}

	.gab-header .wp-block-navigation__responsive-container-open {
		display: flex !important;
	}

	/* Hamburger sits next to the phone chip, not mid-header. */
	.gab-header .wp-block-navigation {
		margin-left: auto;
	}
}

/* Phone CTA in header: mono, eis-500 chip. */
.gab-nav-phone a {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9rem;
	font-weight: 500;
	background: var(--wp--preset--color--eis-500);
	color: var(--wp--preset--color--nacht-900) !important;
	padding: 11px 18px;
	border-radius: var(--wp--custom--radius);
	text-decoration: none;
	white-space: nowrap;
	display: inline-block;
}

.gab-nav-phone a:hover {
	background: var(--wp--preset--color--eis-300);
}

@media (max-width: 781px) {
	.gab-nav-phone { display: none; }
}

/* ---------- hero / cooldown ---------- */

.gab-readout {
	font-family: var(--wp--preset--font-family--mono) !important;
	font-variant-numeric: tabular-nums;
	font-size: var(--wp--preset--font-size--readout);
	line-height: 1.1;
	color: var(--wp--custom--warm-start);
	transition: color 2.4s ease-out;
	min-width: 7ch;
}

.gab-readout.is-cool {
	color: var(--wp--preset--color--eis-300);
	text-shadow: 0 0 32px rgba(127, 212, 247, 0.35); /* sanctioned glow */
}

.gab-readout-sub {
	font-family: var(--wp--preset--font-family--mono) !important;
	font-size: 0.95rem;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--eis-500);
	opacity: 0;
	transition: opacity 0.8s ease 0.2s;
	min-height: 1.6em;
}

.gab-readout-sub.is-visible {
	opacity: 1;
}

/* Shard composition (brand asset a). */
.gab-shards { pointer-events: none; }

.gab-shard {
	/* 0.02, not 0: zero-opacity elements re-trigger LCP when they fade in;
	   near-zero keeps the early paint on the metric and looks identical. */
	opacity: 0.02;
	transform: scale(0.96);
	transform-origin: center;
	transition: opacity 1.1s ease, transform 1.1s ease;
}

.gab-shard.is-in {
	opacity: 1;
	transform: scale(1);
}

/* Photo card: rounded, glowing, frost flows around it. */
.gab-photo-mask img,
.gab-photo-mask {
	border-radius: 16px;
}

.gab-photo-mask img {
	aspect-ratio: 4 / 3;
	width: 100%;
	object-fit: cover;
	object-position: 45% 50%;
	border: 1px solid rgba(127, 212, 247, 0.25);
}

/* FrostFlow energy streams (SVG layers in the hero).
   max-width/margin overrides beat WP's constrained-layout child cap
   (max-width: contentSize), which otherwise boxes the layers to 720px. */
.gab-frost,
.gab-hero-energy {
	max-width: none !important;
	margin: 0 !important;
}

.gab-frost {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	object-fit: cover;
}

.gab-frost--back { z-index: 0; }
.gab-frost--front { z-index: 2; }

/* Phones skip the frost layers entirely (display:none prevents the
   lazy images from ever loading — saves ~200 KB on mobile). */
@media (max-width: 781px) {
	.gab-frost { display: none; }
}

.gab-hero > .wp-block-columns {
	position: relative;
	z-index: 1;
}

/* Hero breathes wider than the standard wide size. */
.gab-hero > .wp-block-columns.alignwide {
	max-width: min(1360px, calc(100% - 48px));
}

/* USP row under the hero CTA. */
.gab-usp {
	position: relative;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 28px 32px;
	max-width: min(1360px, calc(100% - 48px));
	margin: 56px auto 0;
	border-top: 1px solid var(--wp--custom--hairline--dunkel);
	padding-top: 30px;
}

.gab-usp-item {
	display: flex;
	gap: 14px;
	flex: 1 1 230px;
	min-width: 210px;
	align-items: flex-start;
}

.gab-usp-item svg {
	width: 30px;
	height: 30px;
	stroke: var(--wp--preset--color--eis-500);
	flex: none;
	margin-top: 2px;
}

.gab-usp-title {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.8rem;
	color: var(--wp--preset--color--weiss);
	margin-bottom: 4px;
}

.gab-usp-text {
	display: block;
	font-size: 0.88rem;
	color: #93A9BC;
	line-height: 1.5;
}

/* Readout row: flake + temperature. */
.gab-readout-row {
	display: flex;
	align-items: center;
	gap: 18px;
}

.gab-readout-flake {
	width: 44px;
	height: 44px;
	flex: none;
	filter: drop-shadow(0 0 12px rgba(56, 182, 232, 0.5));
}

/* Energy-line divider pinned to the hero's bottom edge. */
.gab-hero-energy {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
}

/* Hero photo: engineered frame with ice glow. */
.gab-photo-mask {
	filter: drop-shadow(0 16px 48px rgba(56, 182, 232, 0.28));
}

/* Scroll reveal (class applied by JS only, so no-JS users see everything). */
.gab-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.55s ease, transform 0.55s ease;
}

.gab-reveal.is-in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.gab-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Header gains a cool glow once scrolled. */
.gab-header.is-scrolled {
	box-shadow: 0 2px 24px rgba(56, 182, 232, 0.18);
}

/* Primary hero CTA: the one sanctioned edge-glow. */
.gab-cta-glow .wp-block-button__link {
	box-shadow: 0 0 0 1px rgba(56, 182, 232, 0.35), 0 0 24px rgba(56, 182, 232, 0.28);
}

@media (prefers-reduced-motion: reduce) {
	.gab-readout {
		color: var(--wp--preset--color--eis-300);
		transition: none;
	}
	.gab-readout-sub { opacity: 1; transition: none; }
	.gab-shard { opacity: 1; transform: none; transition: none; }
}

/* Hero visual wrapper: photo + absolutely positioned shards. */
.gab-hero-visual {
	position: relative;
}

.gab-hero-visual .gab-shards {
	position: absolute;
	left: -14%;
	bottom: -8%;
	width: 95%;
}

/* Logo lockup. */
.gab-logo {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.gab-logo-img {
	height: 62px;
	width: auto;
	display: block;
}

@media (max-width: 781px) {
	.gab-logo-img { height: 50px; }
}

/* Outline (ghost) buttons on dark bands. */
.gab-on-dark .is-style-outline .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--eis-500);
	color: var(--wp--preset--color--eis-300);
	background: transparent;
}

.gab-on-dark .is-style-outline .wp-block-button__link:hover {
	background: rgba(56, 182, 232, 0.12);
	color: var(--wp--preset--color--eis-300);
}

/* ---------- service cards ---------- */

.gab-card {
	border: 1px solid var(--wp--custom--hairline--hell);
	border-radius: var(--wp--custom--radius);
	clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
	transition: border-color 0.18s, transform 0.18s ease, box-shadow 0.18s ease;
	box-shadow: 0 1px 3px rgba(10, 23, 40, 0.06);
}

.gab-card:hover {
	border-color: var(--wp--preset--color--eis-500);
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(10, 23, 40, 0.10), 0 2px 8px rgba(56, 182, 232, 0.12);
}

@media (prefers-reduced-motion: reduce) {
	.gab-card:hover { transform: none; }
}

.gab-card svg {
	width: 38px;
	height: 38px;
	stroke: var(--wp--preset--color--eis-600);
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gab-card-link a {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--tracking--nav);
	text-decoration: none;
}

.gab-card-link a:hover {
	text-decoration: underline;
}

/* ---------- process steps ---------- */

.gab-step {
	border-top: 1px solid var(--wp--custom--hairline--hell);
	padding-top: 20px;
}

.gab-step-num {
	font-family: var(--wp--preset--font-family--mono) !important;
	color: var(--wp--preset--color--eis-600);
	font-size: 0.95rem;
	letter-spacing: 0.15em;
}

/* ---------- brand strip ---------- */

.gab-brands {
	border-top: 1px solid var(--wp--custom--hairline--hell);
	border-bottom: 1px solid var(--wp--custom--hairline--hell);
}

.gab-brands-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 28px;
	align-items: baseline;
	justify-content: center;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.85rem;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--grau-500);
}

.gab-brands-label {
	color: var(--wp--preset--color--tinte);
	font-weight: 500;
}

/* Reference tiles: uniform 4:3 crop, quiet zoom on hover. */
.gab-ref-tile {
	overflow: hidden;
	border-radius: var(--wp--custom--radius);
}

.gab-ref-tile img {
	aspect-ratio: 4 / 3;
	width: 100%;
	object-fit: cover;
	border: 1px solid var(--wp--custom--hairline--hell);
	transition: border-color 0.18s, transform 0.4s ease;
}

.gab-crop-top img {
	object-position: 50% 12%;
}

.gab-crop-low img {
	object-position: 50% 78%;
}

.gab-crop-left img {
	object-position: 12% 50%;
}

.gab-crop-right img {
	object-position: 88% 50%;
}

/* Lightbox shows the full image — tiles crop only in the grid, never enlarged.
   !important: core lightbox sets object-fit:cover as inline style on the clone. */
.wp-lightbox-overlay .gab-ref-tile img,
.wp-lightbox-overlay .gab-crop-top img,
.wp-lightbox-overlay .gab-crop-low img {
	aspect-ratio: auto !important;
	object-fit: contain !important;
	object-position: 50% 50% !important;
	border: none;
}

.gab-ref-tile:hover img {
	border-color: var(--wp--preset--color--eis-500);
	transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
	.gab-ref-tile:hover img { transform: none; }
}

/* ---------- kontakt band ---------- */

.gab-kontakt-list {
	font-family: var(--wp--preset--font-family--mono) !important;
	line-height: 2.1;
}

.gab-kontakt-list a {
	color: var(--wp--preset--color--eis-300);
	text-decoration: none;
}

.gab-kontakt-list a:hover {
	text-decoration: underline;
}

.gab-kontakt-label {
	color: #7FA6BC;
	font-size: 0.8rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	display: block;
	line-height: 1.4;
	margin-top: 14px;
}

.gab-kontakt {
	overflow: hidden; /* watermark bleeds past the right edge by design */
}

/* Snowflake watermark — the one sanctioned decorative use. */
.gab-flake-watermark {
	position: absolute;
	right: -70px;
	top: 50%;
	transform: translateY(-50%);
	width: 380px;
	height: 380px;
	opacity: 0.05;
	pointer-events: none;
}

/* ---------- footer ---------- */

.gab-footer ul {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}

/* Mobile menu toggle must be visible on the navy bar. */
.gab-header .wp-block-navigation__responsive-container-open {
	color: var(--wp--preset--color--weiss);
}

.gab-footer a {
	color: #93A9BC;
	text-decoration: none;
}

.gab-footer a:hover {
	color: var(--wp--preset--color--eis-300);
	text-decoration: none;
}

.gab-footer-heading {
	font-family: var(--wp--preset--font-family--display) !important;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.85rem !important;
	color: var(--wp--preset--color--weiss);
}

.gab-footer-mono {
	font-family: var(--wp--preset--font-family--mono) !important;
	font-size: 0.8rem;
	color: #4E6A80;
	border-top: 1px solid var(--wp--custom--hairline--dunkel);
	padding-top: 22px;
	letter-spacing: 0.06em;
}

/* ---------- FAQ accordion (native details, no JS) ---------- */

.gab-faq .wp-block-details {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--wp--custom--hairline--hell);
	border-radius: var(--wp--custom--radius);
	margin-bottom: 12px;
	padding: 0;
}

.gab-faq .wp-block-details summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	min-height: 44px;
	padding: 16px 52px 16px 20px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.98rem;
	color: var(--wp--preset--color--nacht-900);
}

.gab-faq .wp-block-details summary::-webkit-details-marker {
	display: none;
}

.gab-faq .wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1.25rem;
	color: var(--wp--preset--color--eis-600);
}

.gab-faq .wp-block-details[open] summary::after {
	content: "−";
}

.gab-faq .wp-block-details > :not(summary) {
	padding: 0 20px;
}

.gab-faq .wp-block-details > :last-child:not(summary) {
	padding-bottom: 18px;
}

/* ---------- contact form (rendered by gabriel-core) ---------- */

.gab-form {
	display: grid;
	gap: 18px;
}

.gab-form label {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.8rem;
	color: var(--wp--preset--color--nacht-900);
	margin-bottom: 6px;
}

.gab-form input[type="text"],
.gab-form input[type="tel"],
.gab-form input[type="email"],
.gab-form select,
.gab-form textarea {
	width: 100%;
	min-height: 46px;
	padding: 11px 14px;
	font: inherit;
	color: var(--wp--preset--color--tinte);
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--wp--custom--hairline--hell);
	border-radius: var(--wp--custom--radius);
}

.gab-form textarea {
	min-height: 140px;
	resize: vertical;
}

.gab-form input:focus-visible,
.gab-form select:focus-visible,
.gab-form textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--eis-600);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--eis-600);
}

.gab-form .gab-form-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 0.92rem;
	color: var(--wp--preset--color--grau-500);
}

.gab-form .gab-form-consent input {
	width: 18px;
	height: 18px;
	margin-top: 3px;
	flex: none;
	accent-color: var(--wp--preset--color--eis-600);
}

.gab-form button[type="submit"] {
	justify-self: start;
	cursor: pointer;
	border: none;
}

.gab-form-notice {
	padding: 14px 18px;
	border-radius: var(--wp--custom--radius);
	border: 1px solid var(--wp--preset--color--eis-600);
	background: var(--wp--preset--color--eis-100);
	color: var(--wp--preset--color--tinte);
	margin-bottom: 18px;
}

/* Honeypot — visually removed, still in the DOM for bots. */
.gab-form .gab-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- spec table (Kühlleistung etc.) ---------- */

.gab-spec-table table {
	border-collapse: collapse;
	width: 100%;
}

.gab-spec-table td,
.gab-spec-table th {
	border: none;
	border-bottom: 1px solid var(--wp--custom--hairline--hell);
	padding: 12px 16px 12px 0;
	text-align: left;
}

.gab-spec-table td:last-child {
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--eis-600);
	white-space: nowrap;
}

/* ---------- mobile call bar ---------- */

.gab-callbar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 60;
	display: none;
	grid-template-columns: 1fr 1fr;
	background: var(--wp--preset--color--nacht-900);
	border-top: 1px solid var(--wp--custom--hairline--dunkel);
	margin: 0 !important;
}

.gab-callbar a {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-align: center;
	padding: 16px 8px;
	font-size: 0.9rem;
	text-decoration: none;
	min-height: 44px;
}

.gab-callbar .gab-callbar-primary {
	background: var(--wp--preset--color--eis-500);
	color: var(--wp--preset--color--nacht-900);
}

.gab-callbar .gab-callbar-secondary {
	color: var(--wp--preset--color--eis-300);
}

@media (max-width: 960px) {
	.gab-callbar { display: grid; }
	body { padding-bottom: 56px; } /* keep content clear of the fixed bar */
}
