/*
 * UNOF Panorama: the few things theme.json can't express.
 * Colours, fonts, sizes and radii all come from theme.json variables,
 * so changing them in Appearance > Editor > Styles updates this file's output too.
 */

/* ---------- Page plumbing ---------- */
.wp-site-blocks { position: relative; }
.wp-site-blocks > * { margin-block-start: 0; }
.entry-content.unof-sections > *,
.is-root-container.unof-sections > * { margin-block-start: 0; }

/* Header that sits over the first photo */
.unof-header-overlay { position: absolute; top: 0; left: 0; right: 0; z-index: 30; }
.unof-header-overlay,
.unof-header-overlay a:where(:not(.wp-element-button)) { color: #FFFFFF; }
.editor-styles-wrapper .unof-header-overlay { position: relative; background: var(--wp--preset--color--dark); }

/* Current page in the menu */
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation .wp-block-navigation-item a[aria-current="page"] {
	box-shadow: inset 0 -2px 0 currentColor;
	padding-bottom: 6px;
}

/* ---------- Rising sheet ---------- */
.is-style-sheet { position: relative; z-index: 2; }
.entry-content > .is-style-sheet,
.entry-content.unof-sections > .is-style-sheet,
.is-root-container > .is-style-sheet,
.wp-site-blocks > .is-style-sheet,
main > .is-style-sheet {
	margin-block-start: calc(-1 * var(--wp--custom--sheet-overlap)) !important;
}

/* ---------- Buttons ---------- */
.wp-block-button__link { min-height: var(--wp--custom--button-height); display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; }
.wp-block-button.is-style-glass .wp-block-button__link:hover { background: rgba(255,255,255,0.26); color: #FFFFFF; }
.wp-block-button.is-style-light .wp-block-button__link:hover { background: var(--wp--preset--color--highlight); color: var(--wp--preset--color--contrast); }
.wp-block-button.is-style-outline-dark .wp-block-button__link:hover { background: var(--wp--preset--color--tint); color: var(--wp--preset--color--contrast); }
.unof-header-overlay .wp-block-button__link,
.unof-header .wp-block-button__link { min-height: 48px; padding: 10px 22px; }

/* Service links: big pills with an arrow circle */
.wp-block-button.is-style-service { position: relative; }
.wp-block-button.is-style-service .wp-block-button__link {
	width: 100%;
	justify-content: space-between;
	text-align: left;
	padding: 18px 18px 18px 26px;
	min-height: 84px;
}
.wp-block-button.is-style-service .wp-block-button__link::after {
	content: "";
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background-color: var(--wp--preset--color--primary);
}
.wp-block-button.is-style-service .wp-block-button__link::before {
	content: "";
	position: absolute;
	right: 29px;
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	background: var(--wp--preset--color--on-primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
	z-index: 1;
	pointer-events: none;
}
.wp-block-button.is-style-service .wp-block-button__link:hover { filter: brightness(0.97); }
.unof-down .wp-block-button.is-style-service .wp-block-button__link::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E");
}
.unof-service-links { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.unof-service-links > .wp-block-button { width: auto !important; margin: 0; }

/* ---------- Lists ---------- */
.wp-block-list.is-style-ticks { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.wp-block-list.is-style-ticks li { position: relative; padding-left: 48px; min-height: 32px; padding-top: 3px; }
.wp-block-list.is-style-ticks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
}
.wp-block-list.is-style-ticks li::after {
	content: "";
	position: absolute;
	left: 8px;
	top: 8px;
	width: 16px;
	height: 16px;
	background: #FFFFFF;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-list.is-style-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-list.is-style-chips li { border: 1.5px solid currentColor; border-radius: 999px; padding: 12px 22px; font-weight: 500; opacity: 0.95; }

/* Numbered steps */
.unof-steps { counter-reset: unof-step; }
.unof-step { border-top: 1px solid var(--wp--preset--color--line-dark); padding-top: 28px; }
.unof-step-num {
	width: 56px; height: 56px; border-radius: 999px;
	display: inline-flex !important; align-items: center; justify-content: center;
	font-family: var(--wp--preset--font-family--heading); font-weight: 600;
	margin: 0;
}
.unof-on-light .unof-step { border-top-color: var(--wp--preset--color--line); }

/* Chip rows */
.is-style-chip, .is-style-chip-glass { display: inline-block; }

/* ---------- Photos ---------- */
.wp-block-cover.is-style-d-left,
.wp-block-cover.is-style-d-right,
.wp-block-cover.is-style-rounded,
.wp-block-cover.is-style-circle { overflow: hidden; }
.wp-block-cover.is-style-circle { aspect-ratio: 1 / 1; }
.unof-strip { gap: 6px !important; }
.unof-strip .wp-block-post-template { gap: 6px !important; }
.unof-strip .wp-block-cover { margin: 0; }

/* Edge-to-edge split rows */
.unof-split { gap: 0 !important; }
.unof-split > .wp-block-column { margin: 0 !important; }

/* ---------- Projects ---------- */
.unof-project-card .wp-block-post-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
body:not(.paged) .unof-projects-grid .wp-block-post-template > li:first-child { grid-column: 1 / -1; }
body:not(.paged) .unof-projects-grid .wp-block-post-template > li:first-child .wp-block-cover { min-height: 600px !important; }
body:not(.paged) .unof-projects-grid .wp-block-post-template > li:first-child .wp-block-post-title { font-size: var(--wp--preset--font-size--huge); }

/* ---------- Accessibility ---------- */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}
.wp-block-cover :where(a):focus-visible,
.is-style-band :where(a):focus-visible,
.unof-header-overlay :where(a, button):focus-visible { outline-color: #FFFFFF; }
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
html { scroll-behavior: smooth; }

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.wp-block-cover.is-style-d-left,
	.wp-block-cover.is-style-d-right { border-radius: var(--wp--custom--radius--large) !important; min-height: 360px !important; }
	.unof-split { padding-left: clamp(16px, 4vw, 40px) !important; padding-right: clamp(16px, 4vw, 40px) !important; }
	.unof-split > .wp-block-column > .wp-block-group { padding-left: 0 !important; padding-right: 0 !important; }
	.unof-hero { min-height: 640px !important; }
	.is-style-sheet { --wp--custom--sheet-overlap: 40px; border-top-left-radius: 40px !important; border-top-right-radius: 40px !important; }
	.is-style-band { border-top-left-radius: 40px !important; border-top-right-radius: 40px !important; }
	.unof-strip .wp-block-cover { min-height: 380px !important; }
	body:not(.paged) .unof-projects-grid .wp-block-post-template > li:first-child .wp-block-cover { min-height: 420px !important; }
}

/* Step numbers stay circles even with a background colour */
p.unof-step-num, .unof-step-num.has-background { padding: 0 !important; box-sizing: border-box; flex-shrink: 0; line-height: 1; }

/* Review quotes */
.wp-block-quote cite { display: block; margin-top: 20px; font-family: var(--wp--preset--font-family--body); font-size: var(--wp--preset--font-size--medium); font-style: normal; letter-spacing: 0; opacity: 0.85; }
.wp-block-quote p { margin: 0; }

/* Covers with a custom content position keep the full content width, so wide content lines up with the rest of the page */
.wp-block-cover.has-custom-content-position > .wp-block-cover__inner-container {
	width: 100% !important;
	max-width: var(--wp--style--global--wide-size) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
.wp-block-post-template.alignfull, .unof-strip.alignfull { max-width: none !important; }
.is-style-chip-glass.wp-block-post-terms { display: inline-block; }
.wp-block-image.is-style-circle { flex-shrink: 0; margin: 0; }
@media (max-width: 781px) {
	.unof-cta-left { flex-wrap: wrap !important; }
	.unof-cta-left .wp-block-image.is-style-circle img { width: 120px !important; }
}

/* Mobile: keep tap-to-call in the header, drop the quote button (it's in the hero) */
@media (max-width: 600px) {
	.unof-header-actions .is-style-light { display: none; }
	.unof-header .wp-block-button__link { padding: 8px 16px; font-size: 14px; }
}
@media (max-width: 781px) {
	.is-style-card, .is-style-card-dark, .is-style-card-highlight { padding: 24px !important; }
}
.unof-form-wrap { width: 100%; min-width: 0; box-sizing: border-box; }
.wp-block-column { min-width: 0; }
