/* =========================================================
   R&M PLAST
   Responsive stylesheet
========================================================= */


/* =========================================================
   DESKTOP / SMALL LAPTOP
   1200 px
========================================================= */

@media (max-width: 1200px) {

	.container {
		width: min(calc(100% - 48px), var(--rm-container));
	}

	.site-header__inner {
		width: calc(100% - 40px);
	}

	.site-header__descriptor {
		margin-left: 18px;
		padding-left: 18px;
	}

	.site-header__menu {
		gap: 20px;
	}

	.site-header__actions {
		margin-left: 20px;
		gap: 16px;
	}

	.site-header__cta {
		min-width: 185px;
		padding-inline: 18px;
	}

	.home-hero__content {
		width: 480px;
	}

	.home-hero__title {
		font-size: 62px;
	}

	.hero-technology-card__content {
		padding-left: 22px;
	}

	.hero-technology-card__arrow {
		left: 22px;
	}

	.home-about__grid,
	.home-contact__grid {
		gap: 55px;
	}

	.home-machinery__heading {
		gap: 50px;
	}

}


/* =========================================================
   TABLET
   1024 px
========================================================= */

@media (max-width: 1024px) {

	.section {
		padding-top: 60px;
		padding-bottom: 60px;
	}

	.section-heading {
		grid-template-columns: 1fr;
		gap: 18px;
		margin-bottom: 36px;
	}

	.section-intro {
		max-width: 620px;
	}

	/* HEADER */

	.site-header__inner {
		height: 72px;
	}

	.site-header__logo {
		width: 78px;
		height: 58px;
	}

	.site-header__descriptor {
		display: flex;
		margin-left: 14px;
		padding-left: 14px;
	}

	.site-header__descriptor strong {
		font-size: 12px;
	}

	.site-header__descriptor span {
		font-size: 10px;
	}

	.site-header__nav {
		display: none;
	}

	.site-header__actions {
		margin-left: auto;
	}

	.site-header__languages {
		display: none;
	}

	.site-header__separator {
		display: none;
	}

	.site-header__cta {
		display: none;
	}

	.site-header__toggle {
		display: flex;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: transparent;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 6px;
	}

	.site-header__toggle span {
		display: block;
		width: 26px;
		height: 2px;
		background: #0d1720;
		transition:
			transform 0.25s ease,
			opacity 0.25s ease;
	}

	.site-header__toggle[aria-expanded="true"] span:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}

	.site-header__toggle[aria-expanded="true"] span:nth-child(2) {
		opacity: 0;
	}

	.site-header__toggle[aria-expanded="true"] span:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	.mobile-navigation {
		display: none;
		padding: 22px 24px 26px;
		background: #ffffff;
		border-top: 1px solid #e5e8ea;
		box-shadow: 0 18px 30px rgba(0, 0, 0, 0.08);
	}

	.mobile-navigation.is-open {
		display: block;
	}

	.mobile-navigation__menu {
		margin: 0 0 24px;
		padding: 0;
		list-style: none;
	}

	.mobile-navigation__menu li {
		border-bottom: 1px solid #edf0f2;
	}

	.mobile-navigation__menu a {
		display: block;
		padding: 13px 0;
		color: #101820;
		font-size: 15px;
		font-weight: 700;
		text-transform: uppercase;
	}

	.mobile-navigation__languages {
		display: flex;
		align-items: center;
		gap: 6px;
		margin-bottom: 20px;
		font-size: 13px;
		font-weight: 700;
	}

	.mobile-navigation__languages a {
		color: #77838c;
	}

	.mobile-navigation__languages .is-active {
		color: var(--rm-blue-dark);
	}

	.mobile-navigation__cta {
		width: 100%;
	}

	/* HERO */

	.home-hero {
		background-position: 58% top;
	}

	.home-hero__overlay {
		height: 590px;
		background:
			linear-gradient(
				90deg,
				rgba(5, 20, 32, 0.93) 0%,
				rgba(5, 20, 32, 0.79) 42%,
				rgba(5, 20, 32, 0.32) 75%,
				rgba(5, 20, 32, 0.10) 100%
			);
	}

	.home-hero__main {
		height: 520px;
	}

	.home-hero__content {
		width: 440px;
	}

	.home-hero__title {
		font-size: 58px;
	}

	.home-hero__text {
		font-size: 16px;
	}

	.home-hero__label {
		display: none;
	}

	.hero-technology-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hero-technology-card {
		min-height: 150px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	}

	.hero-technology-card:nth-child(5) {
		grid-column: 1 / -1;
	}

	.hero-technology-card:nth-child(5) {
		grid-template-columns: 1fr 1fr;
	}

	.home-hero__stats-grid {
		grid-template-columns: repeat(3, 1fr);
		padding: 12px 0;
	}

	.home-hero__company {
		grid-column: 1 / -1;
		margin-bottom: 10px;
		text-align: center;
	}

	.home-hero__statement {
		grid-column: 1 / -1;
		margin-top: 10px;
		padding: 10px 0 0;
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		text-align: center;
	}

	.home-hero__stat {
		align-items: center;
		padding-inline: 10px;
		text-align: center;
	}

	.home-hero__stat:first-of-type {
		border-left: 0;
	}

	/* ABOUT */

	.home-about__grid {
		grid-template-columns: 1fr;
		gap: 38px;
	}

	.home-about__media,
	.home-about__media img {
		min-height: 420px;
	}

	.home-about__content {
		max-width: none;
		transform: none;
	}

	/* REFERENCES */

	.reference-card,
	.reference-card--large {
		grid-column: span 6;
	}

	.reference-card:last-child {
		grid-column: span 12;
	}

	/* MACHINERY */

	.home-machinery__heading {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.home-machinery__intro {
		max-width: 620px;
		transform: none;
	}

	.machinery-grid {
		grid-template-columns: 1fr 1fr;
	}

	.machinery-card--primary {
		grid-column: 1 / -1;
		min-height: 430px;
	}

	.machinery-card {
		min-height: 330px;
	}

	/* CONTACT */

	.home-contact__grid {
		grid-template-columns: 1fr;
		gap: 38px;
	}

	.home-contact__content {
		max-width: 720px;
	}

	/* ARCHIVES */

	.archive-grid,
	.technology-archive-grid,
	.reference-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* FOOTER */

	.site-footer__grid {
		width: calc(100% - 48px);
		grid-template-columns: repeat(3, 1fr);
		gap: 38px;
	}

	.site-footer__bottom {
		width: calc(100% - 48px);
	}

}


/* =========================================================
   MOBILE LARGE
   768 px
========================================================= */

@media (max-width: 768px) {

	.container {
		width: calc(100% - 32px);
	}

	.section {
		padding-top: 50px;
		padding-bottom: 50px;
	}

	.section-title {
		font-size: 38px;
	}

	.section-heading {
		margin-bottom: 30px;
	}

	/* HEADER */

	.site-header__inner {
		width: calc(100% - 28px);
		height: 66px;
	}

	.site-header__logo {
		width: 70px;
		height: 52px;
	}

	/* HERO */

	.home-hero {
		background-position: 64% top;
	}

	.home-hero__overlay {
		height: 540px;
		background:
			linear-gradient(
				90deg,
				rgba(4, 17, 28, 0.96) 0%,
				rgba(4, 17, 28, 0.88) 48%,
				rgba(4, 17, 28, 0.42) 100%
			);
	}

	.home-hero__main {
		height: 500px;
		align-items: flex-end;
		padding-bottom: 48px;
	}

	.home-hero__content {
		width: 100%;
		max-width: 430px;
	}

	.home-hero__eyebrow {
		margin-bottom: 20px;
		font-size: 11px;
		letter-spacing: 0.26em;
	}

	.home-hero__title {
		margin-bottom: 18px;
		font-size: 52px;
	}

	.home-hero__text {
		font-size: 15px;
	}

	.home-hero__actions {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}

	.home-hero__cta {
		width: 270px;
		min-height: 56px;
		font-size: 16px;
	}

	.home-hero__quality {
		gap: 14px;
	}

	.home-hero__quality > span {
		height: 48px;
	}

	.home-hero__technologies {
		margin-top: 0;
	}

	.hero-technology-grid {
		grid-template-columns: 1fr;
	}

	.hero-technology-card,
	.hero-technology-card:nth-child(5) {
		grid-column: auto;
		grid-template-columns: 1fr 0.9fr;
		min-height: 145px;
	}

	.hero-technology-card__content {
		padding: 14px 10px 14px 24px;
	}

	.hero-technology-card__arrow {
		left: 24px;
		bottom: 8px;
	}

	.hero-technology-card__image {
		min-height: 145px;
	}

	.home-hero__stats-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0;
		padding: 14px 0;
	}

	.home-hero__company {
		grid-column: 1 / -1;
		padding: 0 0 13px;
		margin: 0;
	}

	.home-hero__stat {
		min-width: 0;
		min-height: 72px;
		padding: 10px 5px;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		border-left: 1px solid rgba(255, 255, 255, 0.12);
	}

	.home-hero__stat:first-of-type {
		border-left: 0;
	}

	.home-hero__stat strong {
		font-size: 22px;
	}

	.home-hero__stat span {
		font-size: 7.5px;
		line-height: 1.25;
	}

	.home-hero__statement {
		grid-column: 1 / -1;
		margin-top: 0;
		padding-top: 14px;
	}

	/* ABOUT */

	.home-about {
		padding-top: 50px;
		padding-bottom: 48px;
	}

	.home-about__media,
	.home-about__media img {
		min-height: 320px;
	}

	.home-about__content .section-title,
	.home-machinery .section-title,
	.home-contact__content .section-title {
		font-size: 38px;
	}

	.capabilities-list {
		grid-template-columns: 1fr;
	}

	/* REFERENCES */

	.home-references {
		padding-top: 50px;
		padding-bottom: 48px;
	}

	.reference-grid {
		grid-template-columns: 1fr;
	}

	.reference-card,
	.reference-card--large,
	.reference-card:last-child {
		grid-column: auto;
	}

	.reference-card__image,
	.reference-card--large .reference-card__image {
		aspect-ratio: 1.35 / 1;
	}

	/* MACHINERY */

	.home-machinery {
		padding-top: 52px;
		padding-bottom: 48px;
	}

	.machinery-grid {
		grid-template-columns: 1fr;
	}

	.machinery-card,
	.machinery-card--primary {
		grid-column: auto;
		min-height: 300px;
	}

	/* CONTACT */

	.home-contact {
		padding-top: 50px;
		padding-bottom: 48px;
	}

	.home-contact__details {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.home-contact__form {
		padding: 26px 22px 28px;
	}

	.form-row--two {
		grid-template-columns: 1fr;
	}

	.form-field textarea {
		min-height: 130px;
	}

	/* ARCHIVES */

	.archive-grid,
	.technology-archive-grid,
	.reference-archive-grid {
		grid-template-columns: 1fr;
	}

	.reference-gallery {
		grid-template-columns: 1fr 1fr;
	}

	/* FOOTER */

	.site-footer__grid {
		width: calc(100% - 32px);
		padding: 38px 0 30px;
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.site-footer__bottom {
		width: calc(100% - 32px);
		min-height: auto;
		padding: 18px 0;
		grid-template-columns: 1fr;
		gap: 10px;
		text-align: center;
	}

	.site-footer__copyright,
	.site-footer__languages,
	.site-footer__credit {
		justify-self: center;
	}

}


/* =========================================================
   MOBILE SMALL
   480 px
========================================================= */

@media (max-width: 480px) {

	.container {
		width: calc(100% - 28px);
	}

	.section-title,
	.home-about__content .section-title,
	.home-machinery .section-title,
	.home-contact__content .section-title {
		font-size: 34px;
		line-height: 1.04;
	}

	.section-eyebrow {
		font-size: 11px;
	}

	/* HEADER */

	.site-header__inner {
		width: calc(100% - 24px);
		height: 62px;
	}

	.site-header__logo {
		width: 64px;
		height: 48px;
	}

	.site-header__toggle {
		width: 40px;
		height: 40px;
	}

	.site-header__descriptor {
		margin-left: 9px;
		padding-left: 9px;
	}

	.site-header__descriptor strong {
		font-size: 11px;
	}

	.site-header__descriptor span {
		font-size: 9px;
	}

	/* HERO */

	.home-hero {
		background-position: 67% top;
	}

	.home-hero__main {
		height: 470px;
		padding-bottom: 38px;
	}

	.home-hero__eyebrow {
		font-size: 10px;
	}

	.home-hero__title {
		font-size: 45px;
		line-height: 0.96;
	}

	.home-hero__text {
		font-size: 14px;
	}

	.home-hero__cta {
		width: 100%;
		max-width: 285px;
	}

	.hero-technology-card,
	.hero-technology-card:nth-child(5) {
		grid-template-columns: 1.05fr 0.95fr;
	}

	.hero-technology-card__content {
		padding-left: 18px;
	}

	.hero-technology-card__arrow {
		left: 18px;
	}

	.hero-technology-card__title {
		font-size: 12.5px;
	}

	.hero-technology-card__text {
		font-size: 10px;
	}

	/* ABOUT */

	.home-about__media,
	.home-about__media img {
		min-height: 260px;
	}

	/* REFERENCES */

	.reference-card__body {
		padding: 16px 18px;
	}

	.reference-card__title {
		font-size: 16px;
	}

	/* MACHINERY */

	.machinery-card,
	.machinery-card--primary {
		min-height: 250px;
	}

	/* CONTACT */

	.home-contact__form {
		padding: 22px 18px 24px;
	}

	.contact-form .button {
		width: 100%;
	}

	/* GALLERY */

	.reference-gallery {
		grid-template-columns: 1fr;
	}

}


/* =========================================================
   TECHNOLOGIES ARCHIVE – MOBILE
   Compact cards: image + technology name only
========================================================= */

@media (max-width: 768px) {

	.site-main--technologies .technologies-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.site-main--technologies .technology-card {
		width: 100%;
		min-width: 0;
	}

	.site-main--technologies .technology-card__link {
		display: grid;
		grid-template-columns: 132px minmax(0, 1fr);
		min-height: 118px;
		height: 100%;
	}

	.site-main--technologies .technology-card__media {
		width: 100%;
		height: 100%;
		min-height: 118px;
		aspect-ratio: auto;
	}

	.site-main--technologies .technology-card__image {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.site-main--technologies .technology-card__content {
		min-width: 0;
		padding: 20px 18px;
		justify-content: center;
	}

	.site-main--technologies .technology-card__title {
		margin: 0;
		font-size: 20px;
		line-height: 1.12;
		letter-spacing: -0.025em;
		overflow-wrap: normal;
		word-break: normal;
	}

	.site-main--technologies .technology-card__excerpt {
		display: none;
	}

	.site-main--technologies .technology-card__arrow {
		margin-top: 12px;
		padding-top: 0;
		font-size: 20px;
	}

}

@media (max-width: 480px) {

	.site-main--technologies .technologies-overview {
		padding-top: 42px;
		padding-bottom: 52px;
	}

	.site-main--technologies .technology-card__link {
		grid-template-columns: 118px minmax(0, 1fr);
		min-height: 108px;
	}

	.site-main--technologies .technology-card__media {
		min-height: 108px;
	}

	.site-main--technologies .technology-card__content {
		padding: 16px 15px;
	}

	.site-main--technologies .technology-card__title {
		font-size: 18px;
		line-height: 1.12;
	}

}


/* =========================================================
   TECHNOLOGY DETAIL – MOBILE
========================================================= */

@media (max-width: 768px) {

	.technology-hero {
		padding: 48px 0 52px;
	}

	.technology-hero__grid {
		grid-template-columns: 1fr;
		gap: 34px;
	}

	.technology-hero__content {
		max-width: none;
	}

	.technology-hero__content::before {
		top: -18px;
	}

	.technology-hero__title {
		font-size: clamp(42px, 12vw, 58px);
		line-height: .98;
	}

	.technology-hero__lead {
		max-width: none;
		font-size: 16px;
		line-height: 1.55;
	}

	.technology-hero__media {
		height: auto;
		aspect-ratio: 1.28 / 1;
	}

	.technology-content {
		padding: 50px 0 54px;
	}

	.technology-content__inner {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.technology-content__body {
		max-width: none;
		padding-left: 26px;
	}

	.technology-content__body h2 {
		margin-top: 36px;
		font-size: 30px;
	}

	.technology-content__body h2::before {
		left: -26px;
	}

	.technology-content__body p,
	.technology-content__body li {
		font-size: 16px;
		line-height: 1.65;
	}

	.technology-references {
		padding: 50px 0 56px;
	}

	.technology-references .section-heading {
		grid-template-columns: 1fr;
		gap: 18px;
		align-items: start;
		margin-bottom: 28px;
		padding-bottom: 22px;
	}

	.technology-references .section-title {
		font-size: 34px;
		line-height: 1.04;
	}

	.technology-references .section-link {
		margin: 0;
		white-space: normal;
	}

	.technology-references .references-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.technology-references .reference-card__link {
		display: grid;
		grid-template-columns: 118px minmax(0, 1fr);
		min-height: 108px;
	}

	.technology-references .reference-card__media {
		height: 100%;
		min-height: 108px;
		aspect-ratio: auto;
	}

	.technology-references .reference-card__content {
		min-height: 108px;
		padding: 16px 16px 16px 18px;
	}

	.technology-references .reference-card__title {
		font-size: 16px;
		line-height: 1.2;
	}

	.project-cta {
		padding: 50px 0 54px;
	}

	.project-cta__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 28px;
	}

	.project-cta__content {
		max-width: none;
	}

	.project-cta__title {
		font-size: 36px;
		line-height: 1.04;
	}

	.project-cta__text {
		max-width: none;
		font-size: 16px;
		line-height: 1.6;
	}

	.project-cta .button {
		width: 100%;
		min-width: 0;
	}

}

@media (max-width: 480px) {

	.technology-hero {
		padding-top: 44px;
	}

	.technology-hero__title {
		font-size: 44px;
	}

	.technology-hero__media {
		aspect-ratio: 1.2 / 1;
	}

	.technology-content__body {
		padding-left: 22px;
	}

	.technology-content__body h2 {
		font-size: 28px;
	}

	.technology-content__body h2::before {
		left: -22px;
	}

	.technology-references .reference-card__link {
		grid-template-columns: 105px minmax(0, 1fr);
	}

	.technology-references .reference-card__title {
		font-size: 15.5px;
	}

	.project-cta__title {
		font-size: 34px;
	}

}


/* =========================================================
   REFERENCE DETAIL – MOBILE
========================================================= */

@media (max-width: 768px) {

	.reference-hero {
		padding: 48px 0 52px;
	}

	.reference-hero__grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.reference-hero__content {
		max-width: none;
	}

	.reference-hero__title {
		font-size: clamp(42px, 12vw, 58px);
		line-height: .98;
	}

	.reference-hero__lead {
		max-width: none;
		font-size: 16px;
		line-height: 1.55;
	}

	.reference-hero__technologies {
		margin-top: 22px;
	}

	.reference-hero__media {
		width: 100%;
		height: auto;
		aspect-ratio: 1.15 / 1;
	}

	.reference-hero__image {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.reference-content {
		padding: 50px 0 54px;
	}

	.reference-content__body {
		max-width: none;
		padding-left: 26px;
	}

	.reference-content__body p,
	.reference-content__body li {
		font-size: 16px;
		line-height: 1.65;
	}

	.reference-gallery {
		margin-top: 34px;
	}

	.reference-gallery__grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.reference-gallery__item {
		width: 100%;
	}

	.reference-gallery__image {
		width: 100%;
		height: auto;
		aspect-ratio: 1.3 / 1;
		object-fit: cover;
	}

	.reference-related {
		padding: 50px 0 56px;
	}

	.reference-related .section-heading {
		grid-template-columns: 1fr;
		gap: 18px;
		align-items: start;
		margin-bottom: 28px;
		padding-bottom: 22px;
	}

	.reference-related .section-title {
		font-size: 34px;
		line-height: 1.04;
	}

	.reference-related .section-link {
		margin: 0;
		white-space: normal;
	}

	.reference-related .references-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.reference-related .reference-card__link {
		display: grid;
		grid-template-columns: 118px minmax(0, 1fr);
		min-height: 108px;
	}

	.reference-related .reference-card__media {
		height: 100%;
		min-height: 108px;
		aspect-ratio: auto;
	}

	.reference-related .reference-card__content {
		min-height: 108px;
		padding: 16px 16px 16px 18px;
	}

	.reference-related .reference-card__title {
		font-size: 16px;
		line-height: 1.2;
	}

}

@media (max-width: 480px) {

	.reference-hero {
		padding-top: 44px;
	}

	.reference-hero__title {
		font-size: 44px;
	}

	.reference-hero__media {
		aspect-ratio: 1.08 / 1;
	}

	.reference-content__body {
		padding-left: 22px;
	}

	.reference-related .reference-card__link {
		grid-template-columns: 105px minmax(0, 1fr);
	}

	.reference-related .reference-card__title {
		font-size: 15.5px;
	}

}


/* =========================================================
   REFERENCE DETAIL – RELATED REFERENCES FIX
========================================================= */

@media (max-width: 768px) {

	.related-references {
		padding: 50px 0 56px;
	}

	.related-references .section-heading {
		grid-template-columns: 1fr;
		gap: 16px;
		align-items: start;
		margin-bottom: 28px;
		padding-bottom: 22px;
	}

	.related-references .section-title {
		font-size: 34px;
		line-height: 1.04;
	}

	.related-references .section-link {
		margin: 0;
		white-space: normal;
	}

	.related-references .references-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.related-references .reference-card {
		width: 100%;
		min-width: 0;
	}

	.related-references .reference-card__link {
		display: grid;
		grid-template-columns: 118px minmax(0, 1fr);
		min-height: 108px;
		height: 100%;
	}

	.related-references .reference-card__media {
		width: 100%;
		height: 100%;
		min-height: 108px;
		aspect-ratio: auto;
		overflow: hidden;
	}

	.related-references .reference-card__image {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.related-references .reference-card__content {
		min-width: 0;
		min-height: 108px;
		padding: 16px 16px 16px 18px;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.related-references .reference-card__title {
		margin: 0;
		font-size: 16px;
		line-height: 1.2;
		overflow-wrap: normal;
		word-break: normal;
	}

	.related-references .reference-card__technologies {
		display: none;
	}

	.related-references .reference-card__arrow {
		margin-top: 10px;
	}

}

@media (max-width: 480px) {

	.related-references .reference-card__link {
		grid-template-columns: 105px minmax(0, 1fr);
	}

	.related-references .reference-card__title {
		font-size: 15.5px;
	}

}


/* =========================================================
   TABLET – REFERENCE ARCHIVE
========================================================= */

@media (max-width: 1024px) {

	.site-main--references .references-grid--archive {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
	}

	.site-main--references .references-grid--archive .reference-card {
		grid-column: auto;
		min-width: 0;
		width: 100%;
	}

}

@media (max-width: 700px) {

	.site-main--references .references-grid--archive {
		grid-template-columns: 1fr;
		gap: 18px;
	}

}


/* =========================================================
   TABLET – HOME HERO TECHNOLOGIES + HOME REFERENCES
========================================================= */

@media (min-width: 769px) and (max-width: 1024px) {

	/* 5th hero technology stays the same size as the other cards */
	.hero-technology-card:nth-child(5) {
		grid-column: auto;
		grid-template-columns: 1fr 0.95fr;
	}

	/* All selected references on homepage have equal width */
	.home-references .reference-card,
	.home-references .reference-card--large,
	.home-references .reference-card:last-child {
		grid-column: span 4;
	}

	.home-references .reference-card--large .reference-card__image {
		aspect-ratio: 1.32 / 1;
	}

}


/* =========================================================
   TABLET – EQUAL REFERENCE CARDS EVERYWHERE
   Prevent every 3rd / last card from expanding full width
========================================================= */

@media (min-width: 769px) and (max-width: 1024px) {

	/* Homepage – selected references */
	.home-references .reference-grid {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
	}

	.home-references .reference-card,
	.home-references .reference-card--large,
	.home-references .reference-card:last-child {
		grid-column: auto !important;
		width: 100%;
		min-width: 0;
	}

	.home-references .reference-card--large .reference-card__image {
		aspect-ratio: 1.32 / 1;
	}

	/* Technology detail – related references */
	.technology-references .references-grid {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
	}

	.technology-references .reference-card,
	.technology-references .reference-card:last-child {
		grid-column: auto !important;
		width: 100%;
		min-width: 0;
	}

	/* Reference detail – related references */
	.related-references .references-grid,
	.reference-related .references-grid {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
	}

	.related-references .reference-card,
	.related-references .reference-card:last-child,
	.reference-related .reference-card,
	.reference-related .reference-card:last-child {
		grid-column: auto !important;
		width: 100%;
		min-width: 0;
	}

}


/* =========================================================
   FINAL TABLET – HOME HERO TECHNOLOGIES
========================================================= */

@media (min-width: 769px) and (max-width: 1024px) {
	.hero-technology-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hero-technology-card,
	.hero-technology-card:nth-child(5) {
		grid-column: auto !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
		min-width: 0;
		height: auto;
		min-height: 170px;
	}

	.hero-technology-card__content {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		min-width: 0;
		height: 100%;
		padding: 16px 12px 16px 24px;
	}

	.hero-technology-card__text {
		max-width: 150px;
	}

	.hero-technology-card__arrow {
		position: static;
		display: block;
		margin-top: 10px;
		font-size: 19px;
		line-height: 1;
	}

	.hero-technology-card__image {
		min-width: 0;
		min-height: 170px;
		overflow: hidden;
	}
}


/* =========================================================
   TABLET HERO IMAGE VISIBILITY
   Keep text side dark, reveal more of the GEISS machine
========================================================= */

@media (min-width: 769px) and (max-width: 1024px) {

	.home-hero {
		background-position: 66% top;
	}

	.home-hero__overlay {
		background:
			linear-gradient(
				90deg,
				rgba(5, 20, 32, 0.93) 0%,
				rgba(5, 20, 32, 0.80) 36%,
				rgba(5, 20, 32, 0.42) 66%,
				rgba(5, 20, 32, 0.12) 100%
			);
	}
}

/* =========================================================
   FINAL TABLET / MOBILE REFINEMENTS
   2026-09-14
========================================================= */

@media (min-width: 769px) and (max-width: 1024px) {
	/* Five cards: 2 + 2 + one full-width card, without an empty cell. */
	.hero-technology-card:nth-child(5) {
		grid-column: 1 / -1 !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	/* Reference gallery stays compact on tablet. */
	.reference-gallery__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 768px) {
	/* Smaller reference images on mobile while keeping one clear column. */
	.reference-gallery__grid {
		grid-template-columns: 1fr;
		gap: 12px;
		max-width: 520px;
		margin-inline: auto;
	}

	.reference-gallery__item {
		min-height: 0;
		aspect-ratio: 1.55 / 1;
	}

	.reference-gallery__image {
		display: block;
		width: 100%;
		height: 100%;
		min-height: 0;
		max-height: none;
		aspect-ratio: auto;
		object-fit: contain;
	}
}


/* =========================================================
   MACHINERY PAGE — RESPONSIVE
========================================================= */
@media (max-width:1024px){
 .machinery-hero__inner,.machinery-section__grid{gap:42px}
 .machinery-hero__media{height:390px}
 .machinery-section__media{height:360px}
 .machinery-photo-strip img{height:180px}
 .machinery-support__inner{gap:42px}
}
@media (max-width:768px){
 .machinery-hero{padding:48px 0 52px}
 .machinery-hero__inner,.machinery-section__grid,.machinery-support__inner{grid-template-columns:1fr;gap:30px}
 .machinery-hero__title{font-size:clamp(42px,12vw,58px)}
 .machinery-hero__text{font-size:16px}
 .machinery-hero__media{height:auto;aspect-ratio:1.28/1}
 .machinery-section{padding:50px 0 54px}
 .machinery-section--alternate .machinery-section__content{order:2}
 .machinery-section--alternate .machinery-section__media{order:1}
 .machinery-section__media{height:auto;aspect-ratio:1.35/1}
 .machinery-section__content h2,.machinery-support h2{font-size:34px;line-height:1.04}
 .machinery-photo-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:26px}
 .machinery-photo-strip img{height:auto;aspect-ratio:1.35/1}
 .machinery-photo-strip img:last-child{grid-column:1/-1;aspect-ratio:1.8/1}
 .machinery-support{padding:50px 0 56px}
 .machinery-photo-strip--support{margin-top:28px}
}
@media (max-width:480px){
 .machinery-hero__title{font-size:44px}
 .machinery-hero__media{aspect-ratio:1.15/1}
 .machinery-section__content h2,.machinery-support h2{font-size:31px}
 .machinery-photo-strip{grid-template-columns:1fr}
 .machinery-photo-strip img,.machinery-photo-strip img:last-child{grid-column:auto;aspect-ratio:1.45/1}
}


/* =========================================================
   MACHINERY PAGE – FINAL EQUIPMENT GALLERY RESPONSIVE
   2026-09-15
========================================================= */

@media (max-width: 1024px) {
	.machinery-equipment-gallery {
		padding: 64px 0 68px;
	}

	.machinery-equipment-gallery__heading {
		grid-template-columns: 1fr;
		gap: 18px;
		margin-bottom: 30px;
	}

	.machinery-equipment-gallery__heading > p {
		max-width: 680px;
	}

	.machinery-equipment-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 768px) {
	.machinery-equipment-gallery {
		padding: 52px 0 56px;
	}

	.machinery-equipment-gallery__heading h2 {
		font-size: 38px;
	}

	.machinery-equipment-gallery__heading > p {
		font-size: 16px;
	}

	.machinery-equipment-gallery__grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.machinery-equipment-gallery__item {
		aspect-ratio: 1.5 / 1;
	}
}

@media (max-width: 480px) {
	.machinery-equipment-gallery__heading h2 {
		font-size: 34px;
	}

	.machinery-equipment-gallery__item {
		aspect-ratio: 1.42 / 1;
	}
}


/* =========================================================
   HOMEPAGE HERO – COMPACT TECHNOLOGY ROWS FINAL
   2026-09-15
========================================================= */

/* Tablet: compact rows, with the lower part of the hero photo kept visible. */
@media (min-width: 769px) and (max-width: 1024px) {
	.home-hero {
		background-position: 70% 92%;
	}

	.home-hero__main {
		height: 590px;
	}

	.home-hero__overlay {
		height: 650px;
	}

	.home-hero__technologies {
		margin-top: 0;
	}

	.hero-technology-grid {
		display: grid;
		grid-template-columns: 1fr;
	}

	.hero-technology-card,
	.hero-technology-card:nth-child(5) {
		grid-column: auto !important;
		display: grid;
		grid-template-columns: 1fr;
		min-height: 58px;
		height: 58px;
		border-left: 1px solid rgba(255, 255, 255, 0.18);
		border-bottom: 1px solid rgba(255, 255, 255, 0.14);
	}

	.hero-technology-card__content {
		display: grid;
		grid-template-columns: 30px minmax(145px, .72fr) minmax(0, 1fr) 22px;
		align-items: center;
		gap: 14px;
		width: 100%;
		height: 58px;
		padding: 0 20px;
	}

	.hero-technology-card__icon {
		width: 27px;
		height: 27px;
		margin: 0;
	}

	.hero-technology-card__title {
		margin: 0;
		font-size: 13px;
		line-height: 1.15;
	}

	.hero-technology-card__text {
		max-width: none;
		margin: 0;
		font-size: 11px;
		line-height: 1.2;
	}

	.hero-technology-card__arrow {
		position: static;
		margin: 0;
		justify-self: end;
		font-size: 18px;
		line-height: 1;
	}

	.hero-technology-card__image {
		display: none;
	}
}

/* Mobile: compact rows and a lower crop so the formed plastic part remains visible. */
@media (max-width: 768px) {
	.home-hero {
		background-position: 72% 100%;
	}

	.home-hero__main {
		height: 560px;
		padding-bottom: 42px;
	}

	.home-hero__content {
		padding-top: 42px;
	}

	.home-hero__overlay {
		height: 610px;
	}

	.home-hero__technologies {
		margin-top: 0;
	}

	.hero-technology-grid {
		display: grid;
		grid-template-columns: 1fr;
	}

	.hero-technology-card,
	.hero-technology-card:nth-child(5) {
		grid-column: auto !important;
		display: grid;
		grid-template-columns: 1fr;
		min-height: 54px;
		height: 54px;
		border-left: 1px solid rgba(255, 255, 255, 0.18);
		border-bottom: 1px solid rgba(255, 255, 255, 0.14);
	}

	.hero-technology-card__content {
		display: grid;
		grid-template-columns: 28px minmax(0, 1fr) 20px;
		align-items: center;
		gap: 11px;
		width: 100%;
		height: 54px;
		padding: 0 16px;
	}

	.hero-technology-card__icon {
		width: 25px;
		height: 25px;
		margin: 0;
	}

	.hero-technology-card__title {
		margin: 0;
		font-size: 12px;
		line-height: 1.15;
	}

	.hero-technology-card__text {
		display: none;
	}

	.hero-technology-card__arrow {
		position: static;
		margin: 0;
		justify-self: end;
		font-size: 18px;
		line-height: 1;
	}

	.hero-technology-card__image {
		display: none;
	}
}

@media (max-width: 480px) {
	.home-hero {
		background-position: 74% 100%;
	}

	.home-hero__main {
		height: 545px;
	}

	.home-hero__content {
		padding-top: 28px;
	}
}


/* =========================================================
   HOMEPAGE HERO – MOBILE/TABLET CROP CORRECTION
   2026-09-15
========================================================= */

/* Tablet: zoom the photo slightly and anchor it to the bottom.
   This makes the lower machine area / formed plastic part enter the viewport. */
@media (min-width: 769px) and (max-width: 1024px) {
	.home-hero {
		background-size: auto 118%;
		background-position: 70% bottom;
	}
}

/* Mobile: the original image is too wide for a portrait viewport.
   A controlled zoom + bottom anchoring shows the lower production area,
   while the content is moved up independently. */
@media (max-width: 768px) {
	.home-hero {
		background-size: auto 125%;
		background-position: 72% bottom;
	}

	.home-hero__content {
		padding-top: 0;
		transform: translateY(-44px);
	}
}

@media (max-width: 480px) {
	.home-hero {
		background-size: auto 130%;
		background-position: 74% bottom;
	}

	.home-hero__content {
		padding-top: 0;
		transform: translateY(-52px);
	}
}
