/**
 * Joontara — styles theme.json can't express.
 * Loaded on the front end and in the editor.
 */

/* ---------- Section styles ---------- */

.is-style-section-night {
	background-image: url("../images/stars.svg");
	background-repeat: repeat;
	background-position: center top;
	background-size: 1440px auto;
}

.is-style-section-night .is-style-eyebrow,
.is-style-section-navy .is-style-eyebrow {
	color: var(--wp--preset--color--gold);
}

/* Eyebrow with a short rule in front, used in heroes. */
.is-style-eyebrow.jt-ruled {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
}

.is-style-eyebrow.jt-ruled::before {
	content: "";
	width: 28px;
	height: 1px;
	background: currentColor;
}

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

.jt-header {
	position: relative;
	z-index: 20;
}

.jt-header .wp-block-navigation-item__content {
	color: var(--wp--preset--color--mist);
	padding-block: 0.6rem;
}

.jt-header .wp-block-navigation-item__content:hover,
.jt-header .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--base);
}

/* Size only: core controls when the menu button is shown. */
.jt-header .wp-block-navigation__responsive-container-open,
.jt-header .wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	color: var(--wp--preset--color--base);
}

.jt-header .wp-block-site-title a,
.jt-footer .wp-block-site-title a {
	color: var(--wp--preset--color--base);
}

.jt-section-aside {
	max-width: 24rem;
}

/* Testimonial cards: equal height, author row pinned to the bottom. */
.jt-testimonials .wp-block-post-template > li > .is-style-card {
	height: 100%;
	box-sizing: border-box;
}

.jt-testimonials .is-style-card > :last-child {
	margin-top: auto;
}

.jt-header .wp-block-navigation__responsive-container-open {
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.jt-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
}

.jt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.25rem;
	color: var(--wp--preset--color--base);
}

@media (max-width: 599px) {
	.jt-header .jt-header-cta {
		display: none;
	}
}

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

.jt-hero-title mark {
	background: none;
	color: var(--wp--preset--color--gold);
}

@media (max-width: 781px) {
	.jt-hero-art {
		display: none;
	}
}

.jt-trusted {
	font-family: var(--wp--preset--font-family--display);
}

/* ---------- Icons ---------- */

.jt-icon {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jt-icon .wp-block-image,
.jt-icon figure {
	margin: 0;
	line-height: 0;
}

.jt-icon img {
	width: 20px;
	height: 20px;
}

/* Service list rows: hairline between items. */
.jt-service-list > * + * {
	border-top: 1px solid var(--wp--preset--color--line);
}

/* ---------- Pills (post terms, service filter) ---------- */

.wp-block-post-terms.is-style-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.wp-block-post-terms.is-style-pills .wp-block-post-terms__separator {
	display: none;
}

.wp-block-post-terms.is-style-pills a {
	display: inline-block;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: var(--wp--preset--color--navy-tint);
	color: var(--wp--preset--color--navy);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
}

.wp-block-post-terms.is-style-pills a:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
}

.is-style-section-night .wp-block-post-terms.is-style-pills a {
	background: rgba(255, 255, 255, 0.1);
	color: var(--wp--preset--color--base);
}

.wp-block-categories.is-style-pills {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.wp-block-categories.is-style-pills li {
	margin: 0;
}

.wp-block-categories.is-style-pills a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.1rem;
	border: 1px solid #CBD2E0;
	border-radius: 999px;
	color: var(--wp--preset--color--navy);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
}

.wp-block-categories.is-style-pills a:hover,
.wp-block-categories.is-style-pills .current-cat > a {
	background: var(--wp--preset--color--navy);
	border-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
}

/* "All" pill that sits before the category list. */
.jt-filter-all a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.1rem;
	border-radius: 999px;
	border: 1px solid var(--wp--preset--color--navy);
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base) !important;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
}

.tax-service .jt-filter-all a {
	background: transparent;
	border-color: #CBD2E0;
	color: var(--wp--preset--color--navy) !important;
}

/* ---------- Cards ---------- */

.jt-project-card .wp-block-post-featured-image {
	overflow: hidden;
	background: var(--wp--preset--color--night);
}

.jt-project-card .wp-block-post-featured-image img {
	transition: transform 0.4s ease;
}

.jt-project-card:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

.jt-project-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--crimson);
}

/* Placeholder box when a project has no image yet. */
.jt-project-card .wp-block-post-featured-image:not(:has(img)) {
	aspect-ratio: 16 / 10;
}

.jt-avatar img {
	border-radius: 999px;
}

.jt-team-card .wp-block-post-featured-image {
	overflow: hidden;
	background: var(--wp--preset--color--base-alt);
}

/* Equal-height cards in grids. */
.jt-equal > .wp-block-post-template > li,
.jt-equal > li {
	display: flex;
}

.jt-equal > .wp-block-post-template > li > *,
.jt-equal > li > * {
	flex: 1;
}

/* ---------- Forms (works with Fluent Forms, WPForms, Contact Form 7 and plain HTML) ---------- */

.jt-form input[type="text"],
.jt-form input[type="email"],
.jt-form input[type="tel"],
.jt-form input[type="url"],
.jt-form input[type="number"],
.jt-form select,
.jt-form textarea {
	width: 100%;
	min-height: 48px;
	padding: 0.75rem 0.875rem;
	border: 1px solid #CBD2E0;
	border-radius: 10px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: 1rem;
	box-sizing: border-box;
}

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

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

.jt-form label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #26314A;
}

.jt-form button[type="submit"],
.jt-form input[type="submit"] {
	width: 100%;
	min-height: 48px;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.jt-form button[type="submit"]:hover,
.jt-form input[type="submit"]:hover {
	background: var(--wp--preset--color--crimson-dark);
}

/* Shown only until a form block is added. */
.jt-form-placeholder {
	border: 1.5px dashed #CBD2E0;
	border-radius: 14px;
}

/* ---------- Misc ---------- */

.jt-arrow-link a,
a.jt-arrow-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
}

.jt-arrow-link a::after,
a.jt-arrow-link::after {
	content: "→";
	transition: transform 0.2s ease;
}

.jt-arrow-link a:hover::after,
a.jt-arrow-link:hover::after {
	transform: translateX(3px);
}

.jt-step-number {
	font-family: var(--wp--preset--font-family--display);
	font-variant-numeric: tabular-nums;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	text-decoration: none;
}

:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--wp--preset--color--navy);
	outline-offset: 2px;
}

:where(.is-style-section-night, .is-style-section-navy) :focus-visible {
	outline-color: var(--wp--preset--color--gold);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

/* ---------- Layout glue ---------- */

/* Header, main and footer sit flush; sections handle their own spacing. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.jt-sections > * {
	margin-block: 0;
}

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

.jt-footer .wp-block-navigation-item__content {
	color: var(--wp--preset--color--mist);
}

.jt-footer .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--base);
}

.jt-footer a {
	text-decoration: none;
}

/* ---------- Project case study ---------- */

/* A meta item whose value is empty shows nothing (the value is removed by Joontara Core). */
.jt-meta:not(:has(> :nth-child(2))) {
	display: none;
}

.single-project .wp-block-post-content h2 {
	font-size: var(--wp--preset--font-size--x-large);
	margin-top: var(--wp--preset--spacing--50);
}

/* ---------- Default page template ---------- */

/* Normal pages: breathing room around the text column. */
.jt-page-content {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--70);
}

/* Pages built from full-width sections: sections run edge to edge, no gaps… */
.jt-page-content:has(> .alignfull:first-child) {
	padding-top: 0;
}

.jt-page-content:has(> .alignfull:last-child) {
	padding-bottom: 0;
}

.jt-page-content > .alignfull {
	margin-block: 0;
}

/* …and the grey title band steps aside, since the first section has its own heading. */
main:has(> .jt-page-content > .alignfull:first-child) > .jt-page-title {
	display: none;
}
