/* Mistic Lighting — main styles (front + editor). Tokens mirror claude/reference/design.md */

/* Brand colours are EDITED in wp-admin: Wygląd → Dostosuj → Kolory (GeneratePress global colours output the
   same variables). :where() has zero specificity, so these values are only fallbacks. */
:where(:root) {
	--navy: #17375e;
	--red: #9c0f0f;
	--red-light: #ef3232;
	--heading: #2c3e50;
	--body: #28323f;
	--card-title: #2a3f67;
	--dark: #353d40;
	--graphite: #3a3b3b;
	--light: #ebebeb;
	--border: #e5e5e5;
	--white: #ffffff;
	--font: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-label: "Open Sans", Arial, sans-serif;
	--header-h: 100px;
}

/* ---------- Base ----------
   Fonts, sizes, letter spacing of body/headings/menu: Wygląd → Dostosuj → Typografia (GeneratePress).
   Colours: Wygląd → Dostosuj → Kolory. Only what GP can't set lives here. */

body,
.editor-styles-wrapper {
	background: var(--white);
}

a {
	color: var(--red);
	text-decoration: none;
	transition: color .2s;
}

a:hover,
a:focus {
	color: var(--red-light);
}

button,
.button,
input[type="submit"],
input[type="button"] {
	font-family: var(--font);
	font-size: 14px;
	color: var(--white);
	background: var(--navy);
	border: 1px solid var(--navy);
	border-radius: .25em;
	padding: .429em 1.143em .643em;
	text-shadow: 0 .075em .075em rgba(0, 0, 0, .5);
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}

button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
	color: var(--white);
	background: var(--red);
	border-color: var(--red);
}

/* ---------- Header ---------- */

/* Header: background, logo width, menu colours/fonts/spacing are GeneratePress settings
   (Wygląd → Dostosuj → Układ / Kolory / Typografia / Identyfikacja witryny). Here: sticky + effects only. */
.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}

.site-header .inside-header {
	position: relative;
}

@media (max-width: 1032px) {
	.site-header .inside-header {
		padding-left: 16px;
		padding-right: 16px;
	}
}

.main-navigation .main-nav ul li a {
	position: relative;
}

.main-navigation .main-nav > ul > li > a::after {
	content: "";
	position: absolute;
	left: 10px;
	right: 10px;
	top: calc(50% + 11px);
	height: 2px;
	background: var(--red);
	transform: scaleX(0);
	transition: transform .2s;
}

.main-navigation .main-nav > ul > li:hover > a::after,
.main-navigation .main-nav > ul > li.current-menu-item > a::after,
.main-navigation .main-nav > ul > li.current-menu-ancestor > a::after {
	transform: scaleX(1);
}

.main-navigation ul ul {
	box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
	border-top: 2px solid var(--navy);
}

@media (min-width: 769px) {
	.main-navigation .inside-navigation {
		flex-wrap: nowrap;
	}
}

@media (min-width: 769px) {
	.main-navigation .main-nav ul li.menu-item-has-children > a {
		padding-right: 10px;
	}

	.main-navigation .menu-item-has-children .dropdown-menu-toggle {
		padding-left: 4px;
		padding-right: 0;
	}
}

.main-navigation .menu-bar-item > a {
	padding: 0 8px;
}

.menu-toggle,
.main-navigation .menu-toggle {
	color: var(--navy);
	background: transparent;
	text-shadow: none;
	border: 0;
}

@media (max-width: 768px) {
	:root {
		--header-h: 70px;
	}

	.site-logo .header-image {
		width: 150px;
	}

	.main-navigation .main-nav ul li a {
		line-height: 48px;
	}

	.main-navigation .main-nav > ul > li > a::after {
		display: none;
	}

	.main-navigation.toggled .main-nav > ul,
	.main-navigation.toggled .main-nav ul ul {
		background: var(--white);
	}

	.main-navigation.toggled .main-nav ul ul {
		border-top: 0;
		box-shadow: none;
	}
}

/* ---------- Language switcher (menu item) ---------- */

.mistic-gt-engine {
	display: none !important;
}

/* Rightmost item of the menu bar (after the search icon), desktop and mobile. */
.main-navigation .menu-bar-item.mistic-lang {
	position: relative;
	display: flex;
	align-items: center;
	margin-left: 8px;
}

.mistic-lang button {
	font-family: var(--font);
	text-shadow: none;
	border-radius: 0;
	cursor: pointer;
}

.mistic-lang__toggle {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 30px;
	padding: 0 13px 0 15px;
	font-size: 12px;
	letter-spacing: .083em;
	color: var(--navy);
	background: transparent;
	border: 1px solid var(--navy);
	border-radius: 15px !important;
	transition: color .2s, background-color .2s, border-color .2s;
}

.mistic-lang__toggle:hover,
.mistic-lang__toggle:focus-visible,
.mistic-lang.is-open .mistic-lang__toggle {
	color: var(--white);
	background: var(--navy);
	border-color: var(--navy);
}

.mistic-lang__chevron {
	transition: transform .2s;
}

.mistic-lang.is-open .mistic-lang__chevron {
	transform: rotate(180deg);
}

.mistic-lang__list {
	position: absolute;
	top: calc(50% + 24px);
	right: 0;
	z-index: 20;
	min-width: 180px;
	padding: 6px 0;
	background: var(--white);
	border-top: 2px solid var(--navy);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s, transform .18s, visibility .18s;
}

.mistic-lang.is-open .mistic-lang__list {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.mistic-lang__option {
	display: flex;
	align-items: baseline;
	gap: 12px;
	width: 100%;
	padding: 9px 18px;
	text-align: left;
	color: var(--navy);
	background: transparent;
	border: 0;
}

.mistic-lang__option:hover,
.mistic-lang__option:focus-visible {
	color: var(--red);
	background: #f5f6f8;
}

.mistic-lang__code {
	min-width: 22px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .083em;
}

.mistic-lang__name {
	font-size: 13px;
	letter-spacing: .02em;
}

.mistic-lang__option[aria-pressed="true"] {
	color: var(--red);
}

.mistic-lang__option[aria-pressed="true"] .mistic-lang__code::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: 0 6px 1px -12px;
	background: var(--red);
	border-radius: 50%;
}

@media (max-width: 768px) {
	.main-navigation .menu-bar-item.mistic-lang {
		margin-left: 2px;
	}

	.mistic-lang__toggle {
		height: 28px;
		padding: 0 10px 0 12px;
	}
}

/* ---------- Page chrome ---------- */

.home .site-content,
.home .inside-article,
.home .entry-content {
	padding: 0;
	margin: 0;
}

.home .inside-article {
	background: transparent;
}

.home .site-main {
	margin: 0;
}

/* ---------- Section title with side lines ---------- */

.ml-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 0;
	font-size: 32px;
	font-weight: 300;
	line-height: 1.1;
	text-align: center;
	color: inherit;
}

.ml-title::before,
.ml-title::after {
	content: "";
	flex: 0 1 140px;
	height: 1px;
	background: currentColor;
}

.ml-band {
	padding: 38px 16px 39px;
	color: var(--white);
}

.ml-band--navy { background: var(--navy); }
.ml-band--dark { background: var(--dark); }
.ml-band--white { color: var(--heading); background: var(--white); }

/* ---------- Hero ---------- */

/* Original slider: 1350×900, scaled proportionally. */
.ml-hero.wp-block-cover {
	min-height: clamp(420px, 66.667vw, 900px);
	padding: 16px;
}

/* "BRING LIGHT<br>TO LIFE": line 2 is the base style, line 1 via ::first-line. */
.ml-hero .ml-hero__title {
	margin: 0;
	font-size: clamp(38px, 7.4vw, 100px);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: 0;
	text-align: center;
	text-transform: uppercase;
	color: var(--navy);
	text-shadow: 0 0 16px var(--white);
}

.ml-hero .ml-hero__title::first-line {
	font-size: clamp(48px, 9.6vw, 130px);
	color: var(--white);
	text-shadow: 0 0 16px var(--navy);
}

/* ---------- Product categories ---------- */

.ml-cats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	background: var(--white);
}

.ml-cat {
	display: flex;
	flex-direction: column;
	color: #000;
	background: var(--white);
	overflow: hidden;
}

.ml-cat__label {
	display: block;
	padding: 15px 10px 16px;
	font-family: var(--font-label);
	font-size: 18px;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
	text-transform: uppercase;
	color: #000;
	border-bottom: 1px solid var(--border);
	transition: color .2s;
}

.ml-cat__img {
	display: block;
	width: 100%;
	aspect-ratio: 338 / 287;
	object-fit: cover;
	transition: transform .5s ease;
}

.ml-cat:hover .ml-cat__label { color: var(--red); }
.ml-cat:hover .ml-cat__img { transform: scale(1.05); }

@media (max-width: 900px) {
	.ml-cats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.ml-cat__label { font-size: 15px; }
}

/* ---------- Realizacje cards ---------- */

.ml-projects {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px 40px;
	padding: 32px 21px 64px;
	background: var(--white);
}

.ml-card {
	display: flex;
	flex-direction: column;
	padding: 10px 10px 32px;
	text-align: center;
	color: inherit;
	background: var(--white);
	border: 1px solid var(--border);
	transition: box-shadow .2s;
}

.ml-card:hover {
	color: inherit;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}

.ml-card__img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.ml-card__title {
	margin: 16px 0 0;
	font-size: 18px;
	line-height: 1.5;
	letter-spacing: -0.042em;
	color: var(--card-title);
	flex: 1;
}

.ml-card__link {
	display: block;
	margin: 30px 0 0;
	font-size: 12px;
	font-weight: 700;
	color: var(--red);
}

@media (max-width: 1024px) {
	.ml-projects { grid-template-columns: repeat(2, 1fr); gap: 26px; }
}

@media (max-width: 560px) {
	.ml-projects { grid-template-columns: 1fr; padding: 32px 16px 40px; }
}

/* ---------- Flip feature cards ---------- */

.ml-features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

.ml-flip {
	position: relative;
	min-height: 428px;
	perspective: 1200px;
	overflow: hidden;
}

.ml-flip__inner {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transition: transform .6s ease;
}

.ml-flip:hover .ml-flip__inner,
.ml-flip:focus-within .ml-flip__inner {
	transform: rotateY(180deg);
}

.ml-flip__front,
.ml-flip__back {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 45px;
	text-align: center;
	overflow: hidden;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.ml-flip__back {
	background: var(--navy);
	transform: rotateY(180deg);
}

.ml-flip--graphite .ml-flip__front { background: var(--graphite); color: var(--white); }
.ml-flip--light .ml-flip__front { background: var(--light); color: #3d3d3d; }
.ml-flip--red .ml-flip__front { background: #9e1010; color: var(--white); }

/* Photo shown at natural size, top-centered (as in the original). */
.ml-flip__bg {
	position: absolute;
	top: 0;
	left: 50%;
	width: 800px;
	max-width: none;
	height: auto;
	transform: translateX(-50%);
	z-index: 0;
}

.ml-flip--graphite .ml-flip__front {
	justify-content: flex-start;
	padding-top: 199px;
}

.ml-flip__front > :not(.ml-flip__bg) {
	position: relative;
	z-index: 1;
}

.ml-flip__icon {
	max-height: 144px;
	width: auto;
	margin-bottom: 10px;
}

.ml-flip h4 {
	margin: 0 0 8px;
	font-size: 25px;
	line-height: 1.372;
	color: inherit;
}

.ml-flip__back h4 {
	color: var(--white);
}

.ml-flip p {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: inherit;
}

.ml-flip--graphite p,
.ml-flip--red p {
	font-weight: 700;
}

/* Touch/narrow: no flip, front face flows with its content. */
@media (max-width: 900px) {
	.ml-features { grid-template-columns: 1fr; }
	.ml-flip { min-height: 0; perspective: none; }
	.ml-flip__inner,
	.ml-flip__front { position: relative; inset: auto; }
	.ml-flip:hover .ml-flip__inner,
	.ml-flip:focus-within .ml-flip__inner { transform: none; }
	.ml-flip__back { display: none; }
	.ml-flip__front { min-height: 380px; }
}

@media (max-width: 600px) {
	.ml-title,
	.ml-newsletter .ml-title { font-size: 24px; }
	.ml-title::before,
	.ml-title::after { flex: 0 0 24px; }
	.ml-band { padding: 28px 16px; }
	.ml-cat__label { display: flex; align-items: center; justify-content: center; min-height: 66px; }
	.ml-flip--graphite .ml-flip__front { padding-top: 190px; }
}

/* ---------- Newsletter ---------- */

.ml-newsletter {
	padding: 62px 16px 48px;
	text-align: center;
	color: var(--white);
	background: #9d1010;
}

.ml-newsletter .ml-title {
	font-size: 37px;
}

.ml-newsletter .ml-title::before,
.ml-newsletter .ml-title::after {
	flex: 0 1 340px;
}

@media (max-width: 600px) {
	.ml-newsletter .ml-title::before,
	.ml-newsletter .ml-title::after { flex: 0 0 24px; }
}

.ml-newsletter__lead {
	max-width: 590px;
	margin: 16px auto 22px;
	font-size: 16px;
	line-height: 1.8;
}

/* MC4WP form: <form.mc4wp-form><div.mc4wp-form-fields><p.ml-newsletter__row>…<label.ml-newsletter__consent> */
.ml-newsletter form {
	max-width: 600px;
	margin: 0 auto;
}

.ml-newsletter__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 24px;
	margin: 0 0 12px;
}

.ml-newsletter .mc4wp-response {
	margin-top: 14px;
	font-size: 15px;
}

.ml-newsletter .mc4wp-alert p {
	margin: 0;
}

.ml-newsletter input[type="email"] {
	width: 252px;
	height: 34px;
	padding: 0 10px;
	font-size: 13px;
	color: #555;
	background: var(--white);
	border: 0;
	border-radius: 0;
}

.ml-newsletter button {
	height: 34px;
	padding: 0 14px;
	border-radius: 0;
	text-shadow: none;
}

.ml-newsletter button:hover {
	background: var(--red-light);
	border-color: var(--red-light);
}

.ml-newsletter__consent {
	display: block;
	font-size: 16px;
}

.ml-newsletter label a {
	color: var(--white);
	text-decoration: underline;
}

/* ---------- Cookie Notice plugin bar (colours set in its settings) ---------- */

#cookie-notice,
#cookie-notice .cn-button {
	font-family: var(--font);
	text-shadow: none;
}

/* ---------- Footer ---------- */

/* Footer = synced pattern "Stopka strony" (group block: background/text colour set in the block).
   Defaults below; colours chosen in the block settings win (inline styles / palette classes). */
.mistic-footer {
	text-align: center;
	color: var(--white);
}

.mistic-footer__inner {
	margin: 0;
	padding: 70px 16px;
}

.mistic-footer__inner:not(.wp-block-group) {
	background: var(--navy); /* fallback template (pattern deleted) */
}

.mistic-footer a {
	color: inherit;
}

.mistic-footer .wp-block-social-links.mistic-social {
	gap: 25px;
	margin: 0 0 20px;
}

.mistic-social .wp-social-link {
	color: var(--white);
	background: rgba(255, 255, 255, .2);
	transition: background-color .2s;
}

.mistic-social .wp-social-link:hover {
	background: rgba(255, 255, 255, .35);
	transform: none;
}

.mistic-social .wp-social-link .wp-block-social-link-anchor {
	padding: 15px;
}

.mistic-social .wp-social-link svg {
	width: 24px;
	height: 24px;
}

p.mistic-footer__menu {
	margin: 0;
	font-size: 11px;
	line-height: 1.3;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.mistic-footer__sep {
	margin: 0 8px;
	opacity: .6;
}

p.mistic-footer__menu a:hover {
	opacity: .75;
}

.mistic-social {
	display: flex;
	justify-content: center;
	gap: 25px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.mistic-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	color: var(--white);
	background: rgba(255, 255, 255, .2);
	border-radius: 50%;
	transition: background-color .2s;
}

.mistic-social a:hover {
	color: var(--white);
	background: rgba(255, 255, 255, .35);
}

.mistic-footer__menu ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mistic-footer__menu li + li::before {
	content: "/";
	margin: 0 8px;
	opacity: .6;
}

.mistic-footer__menu a,
.mistic-footer__copy {
	font-size: 11px;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--white);
}

.mistic-footer__menu a {
	letter-spacing: 1px;
}

.mistic-footer__menu a:hover {
	color: var(--white);
	opacity: .75;
}

.mistic-footer__copy {
	margin: 22px 0 0;
	letter-spacing: 2px;
	opacity: .5;
}
