/*
 * Marta Jarosz Studio — styles that theme.json cannot express:
 * Archivo Expanded (font-stretch), dark mode, header/footer, section patterns and block style variations.
 * Loaded on the front end and in the editor.
 */

/* Dark mode: <html data-theme="dark"> is set before paint by functions.php. */
:root[data-theme="dark"] {
	--wp--preset--color--base: #0e0e0e;
	--wp--preset--color--contrast: #f2f1ee;
	--wp--preset--color--muted: #a8a8a8;
	color-scheme: dark;
}
:root[data-theme="dark"] .mj-brand__mark {
	filter: invert(1);
}

html {
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
body {
	-webkit-font-smoothing: antialiased;
}
:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}
img {
	max-width: 100%;
}

/* Typography: one family, two widths. Headings are Archivo Expanded Light; <strong> is the accent word. */
h1,
h2,
h3,
h4,
.is-style-mj-wide,
.is-style-mj-display {
	font-stretch: 125%;
}
h1 strong,
h2 strong,
h3 strong,
.is-style-mj-display strong {
	font-weight: 500;
}
.is-style-mj-label {
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 500;
	line-height: 1.5;
}
.is-style-mj-wide {
	font-weight: 300;
	font-size: 24px;
	line-height: 1.25;
}
.is-style-mj-display {
	font-weight: 300;
	font-size: clamp(40px, 6.8vw, 108px);
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.mj-lead {
	max-width: 440px;
	line-height: 1.55;
}

/* Header & footer */
.mj-site-header,
.mj-site-footer {
	padding-inline: var(--wp--style--root--padding-left, clamp(16px, 4vw, 56px));
}
.mj-header,
.mj-footer {
	max-width: 1328px;
	margin-inline: auto;
}
.mj-header {
	padding-block: 28px;
	border-bottom: 1px solid currentColor;
	gap: 20px 40px;
}
.mj-header__nav {
	gap: 8px 28px;
}
.mj-header .wp-block-navigation {
	gap: 8px 28px;
}
.mj-header .wp-block-navigation-item__content {
	padding: 12px 0;
	text-decoration: none;
}
.mj-header__cta .wp-block-button__link {
	padding: 13px 22px;
	font-size: 12px;
}

/* „Umów sesję” lives in the header button; inside the phone menu it becomes the last link. */
.mj-header .mj-nav-cta {
	display: none !important;
}
.mj-header .is-menu-open .mj-nav-cta {
	display: flex !important;
}
.mj-header .wp-block-navigation__responsive-container-open,
.mj-header .wp-block-navigation__responsive-container-close {
	padding: 10px;
	margin: -10px;
	color: inherit;
}
/* Beats core's `.wp-block-navigation:not(.has-background) … .is-menu-open` white overlay, so dark mode applies. */
.mj-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	padding: 28px var(--wp--style--root--padding-left, 16px);
}
.mj-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 72px;
	align-items: flex-start;
}
.mj-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 4px;
	align-items: flex-start;
}
.mj-header .is-menu-open .wp-block-navigation-item__content {
	font-size: 30px;
	font-weight: 300;
	font-stretch: 125%;
	letter-spacing: 0.02em;
	padding: 8px 0;
}
.mj-header .is-menu-open .mj-nav-cta .wp-block-navigation-item__content {
	margin-top: 28px;
	padding: 17px 30px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-size: 13px;
	font-weight: 500;
	font-stretch: 100%;
	letter-spacing: 0.16em;
}
.mj-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	color: inherit;
	text-decoration: none;
}
.mj-brand__mark {
	width: 58px;
	height: auto;
}
.mj-brand__text {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.mj-brand__name {
	white-space: nowrap;
	font-weight: 400;
	font-stretch: 125%;
	font-size: 21px;
	letter-spacing: 0.14em;
	line-height: 1;
}
.mj-brand__tagline {
	font-size: 10px;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	font-weight: 500;
	line-height: 1.3;
}
.mj-brand--footer .mj-brand__mark {
	width: 72px;
}
.mj-brand--footer .mj-brand__name {
	font-size: 24px;
}
.mj-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 4px;
	background: none;
	border: 0;
	cursor: pointer;
	color: inherit;
	font: inherit;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 500;
}
.mj-footer {
	padding: 40px 0 48px;
	border-top: 1px solid currentColor;
	gap: 24px;
}
.mj-footer__links {
	gap: 8px 28px;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.mj-footer__links p {
	margin: 0;
	padding: 8px 0;
}
.mj-footer__links a {
	text-decoration: none;
}
.wp-site-blocks > .mj-main,
.wp-site-blocks > .mj-site-footer {
	margin-block-start: 0;
}
.mj-page-title {
	margin-block: clamp(56px, 8vw, 120px) clamp(40px, 5vw, 72px);
}

/* Sections */
.is-style-mj-section {
	border-top: 1px solid currentColor;
	padding-block: clamp(64px, 8vw, 120px);
}
.mj-section-head {
	gap: 16px 40px;
	margin-bottom: clamp(40px, 5vw, 72px);
}
.mj-section-head > p {
	max-width: 360px;
	font-size: 15px;
	line-height: 1.55;
}
.mj-hero {
	padding-block: clamp(48px, 8vw, 120px) clamp(48px, 7vw, 104px);
}
.wp-block-columns.mj-hero {
	gap: clamp(40px, 6vw, 96px);
}
.mj-hero .wp-block-buttons {
	gap: 16px 32px;
	align-items: center;
}
.mj-facts {
	border-top: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
}
.wp-block-columns.mj-facts {
	gap: 0;
}
.mj-facts > .wp-block-column {
	padding: 32px 32px 36px 0;
}
.mj-facts > .wp-block-column > * {
	margin-block: 0 14px;
}
.mj-manifest {
	padding-block: clamp(88px, 12vw, 180px) clamp(72px, 9vw, 140px);
}
.mj-manifest h2 {
	font-size: clamp(40px, 6.8vw, 108px);
	line-height: 0.98;
	max-width: 1200px;
}
.mj-manifest .wp-block-columns {
	margin-top: clamp(56px, 7vw, 104px);
}
.is-style-mj-stagger {
	align-items: flex-start !important;
}
@media (min-width: 782px) {
	.is-style-mj-stagger > .wp-block-column:nth-child(even) {
		padding-top: clamp(0px, 6vw, 96px);
	}
}
.mj-band {
	gap: clamp(12px, 1.6vw, 24px);
}
.mj-band-caption {
	gap: 8px;
	margin-top: 12px;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.mj-band-caption p {
	margin: 0;
}
.mj-notes {
	gap: 12px 40px;
	font-size: 14px;
	line-height: 1.5;
}
.mj-notes p {
	margin: 0;
}

/* Cards (offer) */
.is-style-mj-card,
.is-style-mj-card-dark {
	border: 1px solid currentColor;
	padding: clamp(24px, 3vw, 44px);
}
.is-style-mj-card > * + *,
.is-style-mj-card-dark > * + * {
	margin-block-start: 32px;
}
.is-style-mj-card-dark {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}
.is-style-mj-card-dark a {
	color: inherit;
}
.is-style-mj-card-dark .wp-block-button__link {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}
.mj-card-head {
	gap: 16px;
}
.mj-card-head h3 {
	margin: 0;
}
.mj-card-head p {
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.18em;
	font-weight: 500;
}
.mj-price {
	line-height: 0.9;
}

/* Buttons */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	padding: 17px 30px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.is-style-mj-card-dark .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-mj-link > .wp-block-button__link {
	background: none;
	color: inherit;
	padding: 14px 0;
	text-decoration: underline;
	text-underline-offset: 6px;
}

/* Tables: horizontal rules only, value column right-aligned (offer, contact). */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: 15px;
}
.wp-block-table td,
.wp-block-table th {
	border: 0;
	border-top: 1px solid currentColor;
	padding: 14px 0;
	vertical-align: top;
	text-align: left;
}
.wp-block-table tr:last-child td {
	border-bottom: 1px solid currentColor;
}
.wp-block-table td:last-child:not(:first-child) {
	text-align: right;
	padding-left: 20px;
}
.wp-block-table a {
	text-underline-offset: 4px;
}

/* Images */
.wp-block-image figcaption,
.wp-block-image .wp-element-caption {
	margin-top: 12px;
	margin-bottom: 0;
	text-align: left;
}

/* Opinions */
.wp-block-quote {
	margin: 0;
}
.wp-block-quote::before {
	content: "\201C";
	display: block;
	height: 44px;
	margin-bottom: 28px;
	font-weight: 300;
	font-stretch: 125%;
	font-size: 96px;
	line-height: 0.9;
}
.wp-block-quote p {
	margin: 0;
}
.mj-person {
	gap: 16px;
	padding-top: 20px;
	border-top: 1px solid currentColor;
}
.mj-person p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}
.mj-person .wp-block-image {
	margin: 0;
}
.mj-person .wp-block-image img {
	width: 56px;
	height: 56px;
	object-fit: cover;
}
.mj-person .mj-initial {
	width: 56px;
	height: 56px;
	box-sizing: border-box;
	border: 1px solid currentColor;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 300;
	font-stretch: 125%;
	font-size: 24px;
}
.mj-person .is-style-mj-label {
	font-size: 12px;
}

/* FAQ (core Details block) */
.mj-faq-list {
	border-top: 1px solid currentColor;
}
.mj-faq-list > .wp-block-details {
	margin-block: 0;
}
.wp-block-details {
	border-bottom: 1px solid currentColor;
}
.wp-block-details summary {
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 24px 0;
	min-height: 56px;
	box-sizing: border-box;
	cursor: pointer;
	font-size: clamp(18px, 1.6vw, 22px);
	font-weight: 600;
	line-height: 1.35;
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary::after {
	content: "+";
	flex: none;
	width: 24px;
	text-align: center;
	font-size: 26px;
	font-weight: 400;
}
.wp-block-details[open] summary::after {
	content: "\2212";
}
.wp-block-details > :not(summary) {
	margin: 0;
	padding: 0 48px 28px 0;
	max-width: 680px;
	font-size: 16px;
	line-height: 1.6;
}

/* Two-photo row in „O mnie” */
.mj-pair {
	gap: 16px;
}

/* Gentle reveal on scroll (exhibition photos), only where supported and motion is welcome. */
@keyframes mjReveal {
	from {
		opacity: 0;
		transform: translateY(56px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.mj-reveal {
			animation: mjReveal linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 45%;
		}
	}
}

/*
 * Phones and tablets. Core stacks Columns below 782px and switches the menu to a button below 600px;
 * these rules keep photos two per row and the header on one line.
 */
@media (max-width: 781px) {
	.mj-facts > .wp-block-column {
		padding: 20px 0;
	}
	.mj-facts > .wp-block-column + .wp-block-column {
		border-top: 1px solid currentColor;
	}
	.mj-facts > .wp-block-column > :last-child {
		margin-bottom: 0;
	}
	.wp-block-columns.wp-block-columns.is-style-mj-stagger {
		gap: 24px 12px;
	}
	.wp-block-columns.wp-block-columns.is-style-mj-stagger > .wp-block-column {
		flex: 0 0 calc(50% - 6px) !important;
	}
	.is-style-mj-stagger > .wp-block-column:nth-child(even) {
		padding-top: 48px;
	}
	.is-style-mj-stagger figcaption {
		letter-spacing: 0.12em;
	}
	/* FAQ photos are decoration; on a phone the questions come right after the heading. */
	.mj-faq > .wp-block-column:first-child .wp-block-image {
		display: none;
	}
	.mj-manifest {
		padding-block: 64px 48px;
	}
	.mj-manifest .wp-block-columns {
		margin-top: 40px;
	}
}

/* Tablets: brand on its own row, then all links on one row; the session button becomes a link. */
@media (min-width: 600px) and (max-width: 1023px) {
	.mj-header__nav {
		flex-basis: 100%;
		flex-wrap: nowrap;
		justify-content: space-between;
		gap: 16px;
	}
	.mj-header .wp-block-navigation .wp-block-navigation__container {
		flex-wrap: nowrap;
		gap: 8px 16px;
	}
	.mj-header__cta {
		display: none !important;
	}
	.mj-header .mj-nav-cta {
		display: flex !important;
	}
	.mj-header .mj-nav-cta .wp-block-navigation-item__content {
		text-decoration: underline;
		text-underline-offset: 6px;
	}
}

@media (max-width: 1023px) {
	.mj-toggle {
		min-width: 44px;
		justify-content: center;
	}
	.mj-toggle__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

@media (max-width: 599px) {
	.mj-site-header .mj-header {
		flex-wrap: nowrap;
		gap: 12px;
		padding-block: 16px;
	}
	.mj-header__nav {
		flex-wrap: nowrap;
		gap: 8px;
	}
	.mj-header__nav .wp-block-navigation {
		order: 2;
	}
	.mj-header__cta {
		display: none !important;
	}
	.mj-brand {
		gap: 10px;
	}
	.mj-brand__mark {
		width: 44px;
	}
	.mj-brand__name {
		font-size: 17px;
		letter-spacing: 0.12em;
	}
	.mj-brand__tagline {
		font-size: 9px;
	}
	.mj-brand--footer .mj-brand__mark {
		width: 56px;
	}
	.mj-brand--footer .mj-brand__name {
		font-size: 19px;
	}
	.mj-brand--footer .mj-brand__tagline {
		white-space: normal;
	}
	.mj-hero {
		padding-block: 32px 56px;
	}
	/* Table rows: label and value share a line when they fit, otherwise the value moves under the label. */
	.wp-block-table table,
	.wp-block-table tbody {
		display: block;
	}
	.wp-block-table tr {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 2px 16px;
		padding: 12px 0;
		border-top: 1px solid currentColor;
	}
	.wp-block-table tr:last-child {
		border-bottom: 1px solid currentColor;
	}
	.wp-block-table td,
	.wp-block-table tr:last-child td {
		border: 0;
		padding: 0;
	}
	.wp-block-table td:last-child:not(:first-child) {
		margin-left: auto;
		padding-left: 0;
	}
	.is-style-mj-card,
	.is-style-mj-card-dark {
		padding: 24px 20px;
	}
	.is-style-mj-card > * + *,
	.is-style-mj-card-dark > * + * {
		margin-block-start: 24px;
	}
	.wp-block-quote::before {
		font-size: 72px;
		height: 32px;
		margin-bottom: 20px;
	}
}
