/*
 * Textile Awards - layout and details on top of theme.json.
 *
 * The design (Studio BigFish) is drawn at 1920px wide. Measurements are converted to vw so
 * the page scales down the same way; clamp() keeps them readable on small screens.
 *   Left margin 67px = 3.5vw · side column 461px = 24vw · gap 59px = 3.1vw
 *   text column starts at 586px = 30.5vw · right margin 134px = 7vw
 * Under 782px everything stacks into one column.
 */

:root {
	--ta-header-h: clamp(72px, 7.8vw, 150px);
	--ta-margin: 3.5vw;
	--ta-side: 24vw;
	--ta-gap: 3.1vw;
	--ta-right: 7vw;
	--ta-text-start: calc(var(--ta-margin) + var(--ta-side) + var(--ta-gap));
}

@media (max-width: 781px) {
	:root {
		--ta-margin: 20px;
		--ta-right: 20px;
	}
}

html {
	scroll-padding-top: calc(var(--ta-header-h) + 16px); /* #call-for-entries lands below the fixed header */
}

body {
	margin: 0;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.ta-main {
	margin-top: 0;
	padding-top: var(--ta-header-h);
}

.wp-site-blocks > * + * {
	margin-block-start: 0; /* sections butt together, as in the design */
}

/* ---------------------------------------------------------------- header */

.ta-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	height: var(--ta-header-h);
	background: #fff;
	display: grid;
	grid-template-columns: calc(var(--ta-side) + var(--ta-gap)) 1fr;
	align-items: center;
	padding: 0 var(--ta-right) 0 var(--ta-margin);
	box-sizing: border-box;
}

.admin-bar .ta-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.ta-header .ta-header__logo,
.ta-footer .ta-footer__logo {
	margin: 0;
}

.ta-header__logo img {
	display: block;
	width: clamp(80px, 8.7vw, 167px);
	height: auto;
}

.ta-nav .wp-block-navigation__container {
	gap: 1.9vw;
}

.ta-nav .wp-block-navigation-item__content {
	color: #000;
	font-weight: 200;
	transition: font-weight 0.15s;
}

.ta-nav .wp-block-navigation-item__content:hover,
.ta-nav .wp-block-navigation-item__content:focus,
.ta-nav .current-menu-item > .wp-block-navigation-item__content {
	font-weight: 300;
}

.ta-nav .wp-block-navigation-item__content:hover {
	text-decoration: none;
}

/* "ta 2027": yellow box with a thin black border */
.ta-nav .ta-nav-highlight > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--yellow);
	border: 1px solid #000;
	padding: 0.05em 0.75em;
}

@media (max-width: 781px) {
	.ta-header {
		grid-template-columns: 1fr auto;
	}
	.ta-nav .wp-block-navigation__responsive-container.is-menu-open {
		padding-top: var(--ta-header-h);
	}
	.ta-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		gap: 1em;
		font-size: 22px;
	}
}

/* ---------------------------------------------------------------- sections */

.ta-section {
	padding-block: clamp(48px, 6.5vw, 125px);
}

.ta-section--title {
	padding-top: clamp(24px, 2.4vw, 45px);
	padding-bottom: clamp(32px, 3.5vw, 66px);
}

.ta-section--tight {
	padding-top: 0;
}

/* WordPress pads groups that have a background colour; the bands use the grid's own margins. */
.wp-block-group.ta-band.has-background {
	padding-left: 0;
	padding-right: 0;
}

.ta-section.ta-band {
	/* Bottom space measured on the 15 Oct home design (~95px under the 2027 boxes). */
	padding-block: clamp(20px, 1.8vw, 34px) clamp(32px, 4.6vw, 88px);
}

/* The two-column grid: side column (logo, buttons, boxes) + text column */
.wp-block-columns.ta-split {
	margin: 0;
	padding: 0 var(--ta-right) 0 var(--ta-margin);
	box-sizing: border-box;
}

@media (min-width: 782px) {
	.wp-block-columns.ta-split {
		display: grid;
		grid-template-columns: var(--ta-side) minmax(0, 1fr);
		column-gap: var(--ta-gap);
	}
	.wp-block-columns.ta-split > .wp-block-column {
		margin: 0;
	}
}

.ta-split__main > * {
	max-width: 1200px;
}

.ta-split__main > p {
	max-width: 1120px;
}

.ta-split__side--stack {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
}

.ta-split__side .wp-block-buttons,
.ta-split__side .wp-block-button,
.ta-split__side .wp-block-button__link {
	width: 100%;
}

h1, h2, h3, h4 {
	color: var(--wp--preset--color--black);
}

.ta-split__main > h2 + h3 {
	margin-top: 0.9em;
}

/* Lead text in the title font (Submission intro) */
.ta-lead {
	font-family: var(--wp--preset--font-family--basenji);
	font-size: var(--wp--preset--font-size--subtitle);
	font-weight: 300;
	color: var(--wp--preset--color--black);
	line-height: 1.2;
}

/* ---------------------------------------------------------------- buttons */

.wp-block-button__link {
	text-align: left;
	min-width: var(--ta-side);
	box-sizing: border-box;
	transition: background-color 0.15s, color 0.15s;
}

@media (max-width: 781px) {
	.wp-block-button__link {
		min-width: 240px;
	}
}

.ta-button-dark .wp-block-button__link {
	color: #fff;
}

/* ---------------------------------------------------------------- home */

/* Hero: the 1920x1050 animation, full width at its own proportions. The poster shows
   until the video plays (and stays for reduced-motion visitors). The H1 is in the page
   for SEO but visually hidden - the animation spells the line out itself. */
.ta-hero {
	position: relative;
	aspect-ratio: 1920 / 1050;
	background: var(--wp--preset--color--pink) url("../images/hero-poster.jpg") center / cover no-repeat;
	overflow: hidden;
	margin: 0;
	padding: 0;
}

.ta-hero .ta-hero__video {
	position: absolute;
	inset: 0;
	margin: 0;
}

.ta-hero .ta-hero__video video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Sound on/off (the video autoplays muted - browsers block autoplay with sound). */
.ta-hero__sound {
	position: absolute;
	right: var(--ta-margin);
	bottom: clamp(14px, 2vw, 38px);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(40px, 2.9vw, 56px);
	height: clamp(40px, 2.9vw, 56px);
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.ta-hero__sound:hover,
.ta-hero__sound:focus-visible {
	background: var(--wp--preset--color--yellow);
	color: #000;
	outline: none;
}

.ta-hero__sound svg {
	width: 55%;
	height: 55%;
	fill: currentColor;
}

.ta-hero__sound .ta-hero__sound-on,
.ta-hero__sound[aria-pressed="true"] .ta-hero__sound-off {
	display: none;
}

.ta-hero__sound[aria-pressed="true"] .ta-hero__sound-on {
	display: block;
}

.ta-watermark {
	margin: 0;
}

.ta-watermark img {
	display: block;
	width: 100%;
	height: auto;
}

.ta-split--boxes {
	align-items: stretch;
}

.ta-year-box {
	min-height: clamp(160px, 25vw, 482px);
	padding: clamp(16px, 1.6vw, 30px);
	box-sizing: border-box;
}

.ta-year {
	margin: 0;
	font-family: var(--wp--preset--font-family--basenji);
	font-size: var(--wp--preset--font-size--display);
	font-weight: 500;
	color: #000;
}

.ta-card {
	padding: clamp(18px, 2.1vw, 41px) clamp(18px, 1.2vw, 22px);
	box-sizing: border-box;
}

.ta-card > :first-child {
	margin-top: 0;
}

/* ---------------------------------------------------------------- page titles */

/* Title image in the background, real H1 on top (SEO) */
.ta-page-title {
	position: relative;
	display: inline-block;
	max-width: 100%;
	margin: 0;
}

.ta-page-title__image {
	margin: 0;
}

.ta-page-title__image img {
	display: block;
	height: clamp(44px, 5.4vw, 104px);
	width: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
}

.ta-page-title .ta-page-title__text {
	position: absolute;
	left: 0.6%;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	font-size: clamp(22px, 2.6vw, 50px);
	font-weight: 500;
	color: #000;
	line-height: 1;
}

.ta-page-title + h2 {
	margin-top: clamp(28px, 2.6vw, 50px);
}

/* Pages without a title image: big text title */
.ta-text-title {
	font-family: var(--wp--preset--font-family--basenji);
	font-size: clamp(40px, 5.4vw, 104px);
	font-weight: 500;
	text-transform: uppercase;
	color: var(--wp--preset--color--green);
	line-height: 1;
	margin: 0;
}

/* ---------------------------------------------------------------- awards */

.ta-category {
	align-items: center;
	margin-bottom: clamp(20px, 2.2vw, 42px) !important;
}

.ta-category .ta-split__side {
	display: flex;
	justify-content: flex-end;
}

.wp-block-group.ta-dot.has-background {
	padding: 0; /* WordPress pads groups with a background - it would stretch the circle */
}

.ta-dot {
	width: clamp(48px, 5.8vw, 112px);
	aspect-ratio: 1;
	border-radius: 50%;
	margin-right: 3.4vw;
}

.ta-category__title.wp-block-heading {
	font-size: clamp(18px, 1.55vw, 30px);
	font-weight: 500;
	margin: 0 0 0.2em;
}

.ta-category .ta-split__main p {
	margin: 0;
	color: #000;
}

@media (max-width: 781px) {
	.ta-category {
		display: grid !important;
		grid-template-columns: auto 1fr;
		gap: 16px;
	}
	.ta-dot {
		margin-right: 0;
	}
}

.ta-register-strip {
	position: relative;
	overflow: hidden;
	padding-block: clamp(36px, 4.4vw, 84px);
}

.ta-register-strip .ta-split__side {
	align-self: stretch;
}

@media (min-width: 782px) {
	.ta-watermark--strip {
		position: absolute;
		left: var(--ta-margin);
		top: 0;
		width: var(--ta-side);
	}
}

@media (max-width: 781px) {
	.ta-watermark--strip {
		display: none;
	}
}

/* ---------------------------------------------------------------- form */

.ta-split--form .ta-split__side {
	display: flex;
	align-items: flex-end;
}

.ta-form-title.wp-block-heading {
	font-size: clamp(18px, 1.6vw, 31px);
	margin: 0 0 1em;
}

.ta-form {
	max-width: 1114px;
}

.ta-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(10px, 0.95vw, 18px) clamp(6px, 0.5vw, 9px);
}

.ta-form__field {
	grid-column: 1 / -1;
	display: block;
}

.ta-form__field--first_name,
.ta-form__field--last_name {
	grid-column: auto;
}

.ta-form input[type="text"],
.ta-form input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	height: clamp(44px, 3.4vw, 65px);
	padding: 0 0.8em;
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: 0;
	background: #fff;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	color: var(--wp--preset--color--black);
}

.ta-form input::placeholder {
	color: var(--wp--preset--color--grey);
	font-style: italic;
	opacity: 0.85;
}

.ta-form input:focus {
	outline: 2px solid var(--wp--preset--color--blue);
	outline-offset: -1px;
}

.ta-form__submit {
	margin-top: clamp(18px, 1.4vw, 27px);
}

.ta-form__submit .wp-block-button__link {
	cursor: pointer;
}

.ta-form__hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.ta-form__error,
.ta-form__done {
	font-family: var(--wp--preset--font-family--basenji);
	font-size: var(--wp--preset--font-size--subtitle);
	font-weight: 300;
	color: #000;
}

.ta-form__error {
	color: var(--wp--preset--color--red);
}

.ta-form__privacy {
	font-size: 0.75em;
	margin-top: 1em;
}

@media (max-width: 781px) {
	.ta-form__grid {
		grid-template-columns: 1fr;
	}
	.ta-form__field--first_name,
	.ta-form__field--last_name {
		grid-column: 1 / -1;
	}
}

/* ---------------------------------------------------------------- footer */

.ta-footer {
	margin: 0;
	padding: clamp(32px, 4vw, 77px) 13.7vw clamp(32px, 2.8vw, 54px) var(--ta-margin);
	font-family: var(--wp--preset--font-family--basenji);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 200;
}

.ta-footer a {
	color: #fff;
	text-decoration: none;
	transition: color 0.15s;
}

.ta-footer a:hover,
.ta-footer a:focus {
	color: var(--wp--preset--color--yellow);
}

.ta-footer__top {
	display: grid;
	grid-template-columns: 11.5vw minmax(0, 1fr) var(--ta-side);
	align-items: start;
}

.ta-footer__logo img {
	display: block;
	width: clamp(80px, 8.7vw, 167px);
	height: auto;
}

.ta-footer__nav {
	margin-top: 2.4vw;
}

.ta-footer__nav .wp-block-navigation__container {
	gap: 0.15em;
}

.ta-footer__nav .wp-block-navigation-item__content {
	color: #fff;
	font-weight: 200;
}

.ta-footer__right {
	margin-top: 2.4vw;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-self: stretch;
	gap: 2em;
}

/* The Textile Awards' own socials, bottom-right under the Register button (15 Oct design). */
.ta-footer .ta-footer__social {
	justify-content: flex-end;
	margin-right: 0.4em;
}

/* "Jury": listed, not linked until the jury is announced. */
.ta-footer__nav .ta-nav-unlinked > .wp-block-navigation-item__content,
.ta-footer__nav .ta-nav-unlinked > .wp-block-navigation-item__content:hover {
	color: #fff;
	cursor: default;
}

.ta-footer__right .wp-block-button,
.ta-footer__right .wp-block-button__link {
	width: 100%;
}

.ta-footer .wp-block-social-links {
	gap: 1.1em;
	margin: 0;
	flex-wrap: nowrap;
}

.ta-footer .wp-block-social-links .wp-social-link a {
	padding: 0;
}

.ta-footer .wp-block-social-links .wp-social-link svg {
	width: 1.15em;
	height: 1.15em;
}

.ta-footer .wp-block-social-links .wp-social-link:hover svg {
	fill: var(--wp--preset--color--yellow);
}

.ta-footer__line.wp-block-separator {
	margin: clamp(16px, 1.6vw, 30px) 0 clamp(20px, 2.2vw, 42px) 11.5vw;
	border: 0;
	border-top: 1px solid #fff;
	height: 0;
	opacity: 1;
	background: none !important;
}

.ta-footer__legal {
	margin-left: 11.5vw;
}

.ta-footer__legal p {
	margin: 0 0 0.6em;
	font-size: clamp(13px, 1.05vw, 20px);
}

/* As in the design: Textirama / Fedustria bold + underlined; Term of Use / Privacy Policy plain
   (all turn yellow on hover). */
.ta-footer__legal a {
	text-decoration: none;
}

.ta-footer__legal a:has(strong) {
	text-decoration: underline;
}

@media (max-width: 781px) {
	.ta-footer {
		padding-inline: 20px;
	}
	.ta-footer__top {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.ta-footer__nav,
	.ta-footer__right {
		margin-top: 0;
	}
	.ta-footer__line.wp-block-separator,
	.ta-footer__legal {
		margin-left: 0;
	}
	.ta-footer .ta-footer__social {
		justify-content: flex-start;
	}
}

/* ---------------------------------------------------------------- insights */

/* Intro paragraphs that follow on without a blank line (as in the Insights design) */
.ta-split__main > p.ta-tight {
	margin-top: 0;
	margin-bottom: 0;
}

.ta-split__main > h2 + p.ta-tight {
	margin-top: var(--wp--preset--spacing--20);
}

.ta-videos .ta-split__main > h2 {
	margin-top: 0;
}

.ta-video-grid {
	gap: clamp(20px, 2vw, 39px) !important;
	margin-top: clamp(28px, 2.6vw, 50px);
}

.ta-video {
	margin: 0;
}

.ta-video img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: var(--wp--preset--color--green);
}

.ta-video .wp-element-caption {
	margin: 0.4em 0 0;
	padding-left: 0.25em;
	font-style: italic;
	color: #000;
	text-align: left;
	font-size: var(--wp--preset--font-size--body);
}

/* YouTube tiles: play button over the still; the click swaps in the player (functions.php). */
.ta-video a {
	position: relative;
	display: block;
}

.ta-video a::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: clamp(54px, 4.4vw, 84px);
	height: clamp(54px, 4.4vw, 84px);
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 55% no-repeat;
	border: 2px solid #fff;
	transition: background-color 0.15s, transform 0.15s;
}

.ta-video a:hover::after,
.ta-video a:focus-visible::after {
	background-color: var(--wp--preset--color--blue);
	transform: translate(-50%, -50%) scale(1.06);
}

.ta-video__player {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	background: #000;
}

.ta-watermark--white img {
	opacity: 1;
}

/* ---------------------------------------------------------------- partners */

.ta-section.ta-section--after-title {
	padding-top: clamp(24px, 3.2vw, 62px);
}

.ta-year-box--logo {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: clamp(220px, 32.7vw, 627px);
	padding-bottom: 0;
	overflow: hidden;
}

.ta-year-box__logo {
	margin: 0;
}

.ta-year-box__logo img {
	display: block;
	width: 100%;
	height: auto;
	opacity: 0.5;
}

.ta-year-box--logo .ta-year-box__logo {
	margin-left: calc(-1 * clamp(16px, 1.6vw, 30px));
	margin-right: calc(-1 * clamp(16px, 1.6vw, 30px));
}

/* Body text everywhere = the Partners page text the client preferred (16 Oct): black,
   light (300), line-height 1.43 - set globally in theme.json. Kept for the Partners pattern. */
.ta-text-dark {
	color: #000;
	font-weight: 300;
	line-height: 1.43;
}

/* Bold inside light body text should still read as bold. */
p strong,
li strong {
	font-weight: 700;
}

.ta-highlight {
	color: var(--wp--preset--color--blue);
	font-weight: 700;
}

.ta-partner-logos {
	width: clamp(240px, 21.6vw, 414px);
	margin-top: clamp(40px, 4.8vw, 92px);
	border-top: 1px solid #000;
}

.ta-partner-logo {
	margin: 0 !important;
	padding: clamp(14px, 1.6vw, 30px) 0;
	border-bottom: 1px solid #000;
}

.ta-partner-logo img {
	display: block;
	width: 96%;
	height: auto;
}

.ta-partner-logos > * + * {
	margin-top: 0;
}

/* ---------------------------------------------------------------- phones */

@media (max-width: 781px) {
	/* The grey logo is decoration: skip it on phones, and put the button after the text. */
	.ta-watermark {
		display: none;
	}
	.ta-split__side--stack {
		order: 2;
	}
	.ta-split--form .ta-split__side:empty,
	.ta-split--form .ta-split__side {
		display: none;
	}
	.ta-section--title .ta-split__side:empty,
	.ta-split > .ta-split__side:empty {
		display: none;
	}
	.ta-category .ta-split__side {
		display: block;
	}
	.ta-dot {
		width: 44px;
		height: 44px;
		flex: none;
	}
	.ta-video-grid {
		grid-template-columns: 1fr !important;
	}
	/* Partners: the yellow 2027 box becomes a short banner above the text */
	.ta-year-box--logo {
		min-height: 0;
		flex-direction: row;
		align-items: flex-start;
		gap: 16px;
	}
	.ta-year-box--logo .ta-year-box__logo {
		width: 45%;
		margin: 0 calc(-1 * clamp(16px, 1.6vw, 30px)) 0 auto;
		align-self: flex-end;
	}
}

/* ---------------------------------------------------------------- legal pages */

.ta-legal .ta-split__main {
	max-width: 900px;
}

.ta-legal__title.wp-block-heading {
	font-size: clamp(34px, 3.4vw, 64px);
	margin: 0 0 0.3em;
}

.ta-legal .ta-split__main > p,
.ta-legal .ta-split__main > ul {
	color: #000;
	line-height: 1.43;
}

.ta-legal .ta-split__main > h2 {
	font-size: clamp(20px, 1.6vw, 30px);
	margin-top: 1.8em;
	margin-bottom: 0.5em;
}

.ta-legal .ta-split__main > h3 {
	font-size: clamp(17px, 1.3vw, 25px);
	font-weight: 500;
	margin-top: 1.4em;
	margin-bottom: 0.4em;
}

.ta-legal .ta-split__main > ul {
	padding-left: 1.2em;
}

.ta-legal .ta-split__main > ul li + li {
	margin-top: 0.35em;
}

.ta-legal a {
	color: var(--wp--preset--color--blue);
	word-break: break-word;
}

.ta-legal-updated {
	font-size: 0.8em;
	color: var(--wp--preset--color--grey) !important;
}

/* ---------------------------------------------------------------- form consent */

.ta-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 0.7em;
	margin-top: clamp(14px, 1.1vw, 21px);
	font-size: 0.8em;
	line-height: 1.4;
	color: var(--wp--preset--color--black);
	cursor: pointer;
}

.ta-form__consent input {
	flex: none;
	width: max(18px, 1.25em);
	height: max(18px, 1.25em);
	margin: 0.1em 0 0;
	accent-color: var(--wp--preset--color--blue);
}

.ta-form__consent a {
	color: var(--wp--preset--color--blue);
}

.ta-form__required {
	color: var(--wp--preset--color--red);
}
