/**
 * Entangle Content — CSS for content blocks.
 * Block-intrinsic styles moved out of the theme (assets/css/blocks.css, phase 4b).
 * Enqueued AFTER base (priority 20) + injected into the editor iframe (SSR blocks).
 * Shared/template things (grid/carousel !important ladder, .project-card, .project-status,
 * eyebrow context, prose typography, .project-body/.project-hero) STAY in base.
 * Colors/tokens (--color-*, --font-*, --radius-*, --ease-*) are defined by base.css :root.
 */

/* =========================================================
   entangle/offer
   ========================================================= */
/* ---- entangle/offer — heading aligned with the other sections (smaller) ---- */
.wp-block-entangle-offer .service__title {
	font-size: var(--wp--preset--font-size--section-title, clamp(2.25rem, 3.8vw, 3.75rem));
	line-height: 1.02;
	letter-spacing: -0.02em;
	margin-bottom: 0;
}
.wp-block-entangle-offer .service__copy {
	font-size: inherit;
	line-height: 1.6;
	margin-top: clamp(20px, 2.4vw, 34px);
}
/* spacing heading → items same as in „Naše projekty" (section-head) */
.wp-block-entangle-offer .service__head { margin-bottom: clamp(32px, 4vw, 56px) !important; }
.wp-block-entangle-offer .offer-grid { margin-top: 0; }

/* ---- entangle/offer — „Co nabízíme": icon + name in a grid with 1px rules ---- */
.wp-block-entangle-offer .offer-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	margin-top: clamp(20px, 2.4vw, 36px);
	border-top: 1px solid var(--color-rule);
	position: relative;
}
/* Left rule via ::before — border-left on the grid would shift columns by 1px
   and double (darken) the rule against the background grid. */
.wp-block-entangle-offer .offer-grid::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 1px;
	background: var(--color-rule);
	pointer-events: none;
}
@media (min-width: 1500px) { .wp-block-entangle-offer .offer-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) { .wp-block-entangle-offer .offer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wp-block-entangle-offer .offer-grid { grid-template-columns: 1fr; } }
.wp-block-entangle-offer .offer-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: clamp(20px, 2.2vw, 32px);
	background: var(--color-bg-alt);
	border-right: 1px solid var(--color-rule);
	border-bottom: 1px solid var(--color-rule);
	text-decoration: none;
	color: var(--color-ink);
	transition: background-color .15s ease;
}
/* hover: brand background, white icon and text */
.wp-block-entangle-offer .offer-item:hover { background: var(--color-brand); }
.wp-block-entangle-offer .offer-item:hover .offer-item__icon,
.wp-block-entangle-offer .offer-item:hover .offer-item__title,
.wp-block-entangle-offer .offer-item:hover .offer-item__title::after { color: var(--color-on-brand); }
.wp-block-entangle-offer .offer-item__icon {
	font-size: 1.5rem;
	color: var(--color-brand);
}
.wp-block-entangle-offer .offer-item__title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: inherit;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -0.005em;
	color: var(--color-ink);
	transition: color .15s ease;
}
/* affordance: arrow like the other links (shifts on hover) */
.wp-block-entangle-offer .offer-item__title::after {
	content: "→";
	display: inline-block;
	margin-left: 8px;
	color: var(--color-brand);
	transition: transform .2s ease;
}
/* spacing of the CTA buttons from the grid */
.wp-block-entangle-offer .service__ctas { margin-top: clamp(32px, 4vw, 56px); }
.wp-block-entangle-offer .offer-item:hover .offer-item__title::after { transform: translateX(4px); }
.wp-block-entangle-offer .offer-item:focus-visible { outline: 2px solid var(--color-brand); outline-offset: -2px; }

/* =========================================================
   entangle/project-examples — off-canvas drawer + carousel spacing
   ========================================================= */
.project-examples > .projects { padding-top: clamp(8px, 1.4vw, 20px); }
/* Off-canvas project detail (from the left, large) — opens from the „Příklady projektů" cards */
.project-drawer { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.project-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--color-ink) 40%, transparent);
	opacity: 0;
	transition: opacity .25s ease;
}
.project-drawer__panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(1100px, 96vw);
	background: var(--color-bg);
	transform: translateX(-100%);
	transition: transform .38s var(--ease-emphasized);
	overflow-y: auto;
	padding: 0;
}
.project-drawer.is-open { pointer-events: auto; }
.project-drawer.is-open .project-drawer__backdrop { opacity: 1; }
.project-drawer.is-open .project-drawer__panel { transform: translateX(0); }
/* Close bar stuck to the top, on a brand background */
.project-drawer__bar {
	position: sticky;
	top: 0;
	z-index: 3;
	height: 0;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
}
.project-drawer__close {
	pointer-events: auto;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	background: var(--color-brand);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-on-brand);
	transition: background .15s ease;
}
.project-drawer__close:hover { background: var(--color-brand-deep); }
.project-drawer__close svg { width: 20px; height: 20px; }
.project-drawer__item { display: none; }
.project-drawer__item.is-active {
	display: grid;
	grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
	gap: clamp(28px, 3.5vw, 56px);
	align-items: start;
	padding: clamp(28px, 4vw, 56px);
}
.project-drawer__main { min-width: 0; }
@media (max-width: 768px) {
	.project-drawer__item.is-active { grid-template-columns: 1fr; gap: clamp(20px, 5vw, 32px); }
}
.project-drawer__eyebrow {
	display: block;
	font-size: clamp(0.8125rem, 1vw, 0.875rem);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--color-brand);
	margin: 0 0 clamp(16px, 2vw, 24px);
}
.project-drawer__title {
	font-family: var(--font-serif);
	font-weight: 400;
	font-size: clamp(2rem, 3.4vw, 3.25rem);
	line-height: 1.04;
	letter-spacing: -0.02em;
	color: var(--color-ink);
	margin: 0 0 clamp(20px, 2.6vw, 32px);
}
.project-drawer__media {
	margin: 0;
	aspect-ratio: 6 / 4;
	overflow: hidden;
	border-radius: var(--radius-media);
}
.project-drawer__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.project-drawer__lead {
	font-size: 1.125rem;
	line-height: 1.55;
	color: var(--color-ink);
	margin: 0 0 clamp(16px, 2vw, 24px);
}
.project-drawer__content > * { margin-block: clamp(16px, 2vw, 26px); }
.project-drawer__full { display: inline-block; margin-top: clamp(24px, 3vw, 40px); }

/* =========================================================
   entangle/oblast-banner
   ========================================================= */
/* Area banner (below „Další projekty" on the project detail) */
.oblast-banner-section { padding-top: clamp(8px, 1.4vw, 24px); padding-bottom: clamp(48px, 6vw, 96px); }
.oblast-banner-section .container { display: grid; gap: clamp(12px, 1.5vw, 20px); }
.oblast-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(20px, 3vw, 48px);
	flex-wrap: wrap;
	background: var(--color-brand);
	color: var(--color-on-brand);
	text-decoration: none;
	padding: clamp(20px, 2.4vw, 36px) clamp(24px, 3.5vw, 56px);
	border-radius: var(--radius-media);
	transition: background-color .2s ease;
}
.oblast-banner:hover {
	/* halfway between brand and brand-deep — the full deep shade was too strong */
	background: var(--color-brand-deep);
	background: color-mix(in srgb, var(--color-brand), var(--color-brand-deep) 50%);
}
.oblast-banner__title {
	display: block;
	font-family: var(--font-serif);
	font-weight: 400;
	font-size: clamp(1.625rem, 3vw, 2.75rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
}
/* Circled arrow on the right (same look as entangle/text-banner in the base theme) */
.oblast-banner__arrow {
	flex: 0 0 auto;
	width: clamp(44px, 4vw, 56px);
	aspect-ratio: 1;
	border-radius: 50%;
	border: 1.5px solid currentColor;
	display: grid;
	place-items: center;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.oblast-banner__arrow svg { width: 44%; height: auto; display: block; }
.oblast-banner:hover .oblast-banner__arrow {
	background: var(--color-on-brand);
	color: var(--color-brand);
	border-color: var(--color-on-brand);
}

/* =========================================================
   entangle/back-to-project
   ========================================================= */
/* ---- Project subpage: link back to the project ---- */
.back-to-project {
	margin: 0 0 18px;
	font-size: 0.875rem;
	font-weight: 500;
}
.back-to-project a {
	color: var(--color-brand);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: gap .15s ease;
}
.back-to-project a:hover { gap: 12px; }

/* =========================================================
   entangle/project-dates
   ========================================================= */
/* ---- Project detail: „Doba realizace" row below the heading ---- */
.project-hero__dates {
	margin: clamp(18px, 2.2vw, 28px) 0 0;
	font-size: 0.9375rem;
	color: var(--color-ink);
}
.project-hero__dates-label {
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--color-brand);
	margin-right: 4px;
}

/* =========================================================
   entangle/gated-download
   ========================================================= */
/* ---- Download button / email gate („Stažení souboru") ---- */
.dl-gate {
	max-width: 560px;
	margin-top: clamp(28px, 4vw, 44px);
	margin-bottom: clamp(28px, 4vw, 44px);
}
.dl-gate__intro {
	margin: 0 0 14px;
	font-size: 1rem;
	line-height: 1.6;
}
.dl-gate__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.dl-gate__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.dl-gate__email {
	flex: 1 1 220px;
	min-width: 0;
	padding: 10px 14px;
	font: inherit;
	color: var(--color-ink);
	background: #fff;
	border: 1px solid var(--color-rule);
	border-radius: 0;
}
.dl-gate__email:focus-visible {
	outline: 2px solid var(--color-brand);
	outline-offset: 1px;
}
/* Buttons in the site-wide button style (same spec as core/button in base blocks.css —
   brand background, → arrow, brand-deep hover; these lack .wp-block-button__link). */
.dl-gate__button,
.dl-gate__submit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 22px;
	border: 1px solid var(--color-brand);
	border-radius: 0;
	background-color: var(--color-brand);
	color: var(--color-on-brand);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.dl-gate__button::after,
.dl-gate__submit::after {
	content: "→";
	font-size: 0.875rem;
	transition: transform .2s ease;
}
.dl-gate__button:hover,
.dl-gate__submit:hover {
	background-color: var(--color-brand-deep);
	border-color: var(--color-brand-deep);
	color: var(--color-on-brand);
}
.dl-gate__button:hover::after,
.dl-gate__submit:hover::after { transform: translateX(4px); }
.dl-gate__submit:disabled {
	opacity: 0.6;
	cursor: default;
}
.dl-gate__consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.875rem;
	line-height: 1.5;
	cursor: pointer;
}
.dl-gate__consent input {
	margin-top: 2px;
	flex: none;
	width: 18px;
	height: 18px;
	accent-color: var(--color-brand);
}
.dl-gate__consent a { text-decoration: underline; }
.dl-gate__message { margin: 0; font-size: 0.875rem; }
.dl-gate__message:empty { display: none; }
.dl-gate__message--error { color: #b3261e; }
.dl-gate__success:focus { outline: none; }
.dl-gate__success p { margin: 0; font-weight: 500; }
/* Honeypot: offscreen, not display:none (some bots skip hidden fields). */
.dl-gate__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
