/* ==========================================================================
   TSM – front-end styles
   Colours and fonts come from CSS variables set in "Edit Website → Colours & Fonts".
   Breakpoints follow the original site: mobile ≤767px, tablet ≤1200px, wide ≥1600px.
   ========================================================================== */

:root {
	--tsm-primary: #033286;
	--tsm-secondary: #89C8ED;
	--tsm-bg: #0D1B2A;
	--tsm-dark: #0A0A0A;
	--tsm-heading: #FFFFFF;
	--tsm-text: #B6BBBF;
	--tsm-btn-a: #266E98;
	--tsm-btn-b: #66B5E3;
	--tsm-font-head: "Exo", sans-serif;
	--tsm-font-body: "Lato", sans-serif;
	--tsm-body-size: 1.125rem;
	--tsm-grad: linear-gradient(90deg, var(--tsm-dark) -30%, var(--tsm-primary) 100%);
	--tsm-header-overlap: 90px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--tsm-bg);
	color: var(--tsm-text);
	font-family: var(--tsm-font-body);
	font-size: var(--tsm-body-size);
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
	border: 0;
	vertical-align: middle;
}

a {
	color: var(--tsm-secondary);
	transition: color .3s, opacity .3s;
}

p {
	margin: 0 0 .9rem;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--tsm-font-head);
	font-weight: 600;
	color: var(--tsm-heading);
	margin: 0;
	line-height: 1;
}

h1, .h1 { font-size: 3rem; line-height: 1.2; }
h2, .h2 { font-size: 2rem; line-height: 1.4; }
h3, .h3 { font-size: 1.5rem; line-height: 1.3; }
h4, .h4 { font-size: 1rem; }

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

[hidden] {
	display: none !important;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 10px;
	top: -100px;
	z-index: 100000;
	background: #fff;
	color: var(--tsm-bg);
	padding: 10px 16px;
	border-radius: 4px;
	font-weight: 700;
}

.skip-link:focus {
	top: 10px;
}

:focus-visible {
	outline: 2px solid var(--tsm-secondary);
	outline-offset: 2px;
}

.text-center { text-align: center; }
.text-justify { text-align: justify; }

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

/* Like the original builder: vertical spacing is a % of the content width, so it sits on .wrap. */
.sec {
	position: relative;
	padding: 0 var(--px, 5%);
}

.sec > .wrap {
	padding-top: var(--pt, 7%);
	padding-bottom: var(--pb, 7%);
}

.sec--history {
	padding: var(--pt, 7%) 0 var(--pb, 7%);
}

.bg-grad { background: var(--tsm-grad); }
.bg-navy { background: var(--tsm-bg); }
.bg-none { background: transparent; }

.wrap {
	position: relative;
	width: 100%;
	max-width: 1600px;
	margin: 0 auto;
}

.row {
	display: flex;
	gap: 20px;
}

.row--100 { gap: 100px; }

.col {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 10px;
}

.col--center { justify-content: center; }
.col--end { justify-content: flex-end; }
.col--media { padding: 10px 10px 0; justify-content: center; }
.col--pad-top { padding: 10px 10px 0; }

.stack { display: flex; flex-direction: column; gap: 20px; }
.stack--0 { gap: 20px; }
.stack--20 { gap: 20px; }
.stack--50 { display: flex; flex-direction: column; gap: 50px; }
.stack--60 { gap: 60px; }
.stack--110 { gap: 110px; }

.sec-head {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 10px 10px 0;
}

.sec-head--center { align-items: center; text-align: center; }
.sec--history .sec-head { padding: 10px; }

/* Photo on the right: same column spacing as the original */
.row--flip > .col--center { padding-bottom: 0; }
.row--flip > .col--media { padding-bottom: 10px; }

/* Vision / Mission rows */
.row--boxed { padding: 1px; }
.row--boxed .col--media { padding: 10px; }
.row--boxed.row--flip > .col--center { padding-bottom: 10px; }

/* Text blocks keep the space under their last paragraph, as in the original builder. */
.tsm-text p { margin-bottom: .9rem; }
.tsm-text--loose p { margin-bottom: 1.5em; }
.tsm-text a { color: var(--tsm-secondary); }

/* Small label with the blue line */
.eyebrow {
	display: block;
	align-self: flex-start;
	font-family: var(--tsm-font-body);
	font-size: .875rem;
	font-weight: 400;
	line-height: calc(var(--tsm-body-size) * 1.5);
	text-transform: uppercase;
	color: var(--tsm-text);
	border-left: 3px solid var(--tsm-secondary);
	padding-left: 15px;
}

.sec-head--center .eyebrow { align-self: center; }
.eyebrow--light { color: #fff; border-left-color: var(--tsm-primary); }

/* Buttons */
.tsm-btn {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 10px;
	font-family: var(--tsm-font-body);
	font-size: .875rem;
	font-weight: 500;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	padding: 12px 15px;
	border: 0;
	border-radius: 5px;
	background: linear-gradient(90deg, var(--tsm-btn-a) -20%, var(--tsm-btn-b) 50%);
	cursor: pointer;
	transition: filter .3s, transform .3s;
}

.tsm-btn:hover,
.tsm-btn:focus-visible {
	color: #fff;
	filter: brightness(1.12);
}

.tsm-btn svg {
	width: 12px;
	height: 12px;
	flex: none;
}

.tsm-btn--dark {
	font-family: var(--tsm-font-head);
	font-size: 1rem;
	padding: 17px 22px;
	background: linear-gradient(90deg, var(--tsm-dark) -20%, var(--tsm-primary) 100%);
}

/* Fade-in when scrolling into view */
.reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .9s ease, transform .9s ease;
}

.reveal.is-visible,
.no-js .reveal,
.customize-partial-edit-shortcuts-shown .reveal {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	html { scroll-behavior: auto; }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: relative;
	z-index: 999;
}

.tsm-navbar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 1% 5%;
	background: rgba(20, 20, 20, .5);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.tsm-navbar::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: linear-gradient(to right, rgba(214, 214, 214, 0) 0%, rgba(255, 255, 255, .3) 59%, rgba(153, 153, 153, 0) 100%);
	pointer-events: none;
}

.tsm-navbar > * {
	height: 68px;
	display: flex;
	align-items: center;
}

.tsm-logo {
	flex: 0 1 15%;
	padding: 10px;
}

.tsm-logo img {
	width: 90%;
	filter: brightness(0) invert(1);
}

.tsm-menu {
	flex: 0 1 70%;
	justify-content: center;
}

.tsm-translate {
	flex: 0 1 15%;
	justify-content: flex-end;
}

.menu-toggle {
	display: none;
}

.menu-list {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.menu-link {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 8px 16px;
	font-family: var(--tsm-font-head);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	background: none;
	border: 0;
	cursor: pointer;
	white-space: nowrap;
}

.menu-link:hover,
.menu-link:focus-visible,
.menu-item.is-open > .menu-link {
	color: var(--tsm-secondary);
}

.menu-chevron {
	display: inline-flex;
	transition: transform .25s ease;
}

.menu-chevron svg {
	width: 13px;
	height: 13px;
}

.menu-item.is-open .menu-chevron {
	transform: rotate(180deg);
	color: var(--tsm-secondary);
}

/* Dropdown (full width under the bar) */
.dropdown {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s;
}

.menu-item.is-open > .dropdown {
	opacity: 1;
	visibility: visible;
}

.dropdown__inner {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding: 3% 5%;
	background-color: var(--tsm-bg);
	background-image: url("../img/globe.png");
	background-repeat: no-repeat;
	background-position: 110% -250px;
	background-size: 40% auto;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.dropdown__heading {
	flex: 0 0 calc(20% - 1px);
	padding: 10px;
	font-family: var(--tsm-font-head);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
	color: #fff;
}

.dropdown__links {
	list-style: none;
	margin: 0;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	line-height: 1.5;
	font-size: 1rem;
}

.dropdown__links a {
	font-family: var(--tsm-font-head);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--tsm-secondary);
	text-decoration: none;
	transition: color .5s;
}

.dropdown__links a:hover,
.dropdown__links a:focus-visible {
	color: #fff;
}

/* ---------- Language switcher (TSM Inline Editor) ---------- */

.lang-switch {
	position: relative;
	font-family: var(--tsm-font-head);
}

.lang-switch__current {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 13px 8px 9px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	line-height: 1;
	cursor: pointer;
	transition: background .25s ease;
}

.lang-switch__current:hover {
	background: rgba(255, 255, 255, .26);
}

.lang-switch__flag svg {
	display: block;
	width: 20px;
	height: 20px;
}

.lang-switch__code {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
}

.lang-switch__chevron {
	width: 8px;
	height: 8px;
	border-right: 1.5px solid rgba(255, 255, 255, .85);
	border-bottom: 1.5px solid rgba(255, 255, 255, .85);
	transform: rotate(45deg) translateY(-2px);
	transition: transform .25s ease;
}

.lang-switch.is-open .lang-switch__chevron {
	transform: rotate(-135deg) translateY(-2px);
}

.lang-switch__menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 1001;
	min-width: 190px;
	margin: 0;
	padding: 6px;
	list-style: none;
	border-radius: 12px;
	background: rgba(13, 27, 42, .94);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 16px 34px rgba(0, 0, 0, .45);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px) scale(.97);
	transform-origin: top right;
	transition: opacity .22s ease, transform .22s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .25s;
}

.lang-switch.is-open .lang-switch__menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.lang-switch__menu a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 8px;
	color: #E6EAF0;
	font-size: 14px;
	line-height: 1.3;
	text-decoration: none;
	transition: background .18s ease;
}

.lang-switch__menu a:hover {
	background: rgba(137, 200, 237, .15);
}

.lang-switch__menu a.is-current {
	color: var(--tsm-secondary);
	font-weight: 600;
}

/* ---------- Language switcher (GTranslate, only if the plugin above is not active) ---------- */

.gtranslate_wrapper .gt_switcher {
	position: relative;
	width: auto !important;
	height: auto !important;
	font-family: var(--tsm-font-head) !important;
	overflow: visible !important;
}

.gt_switcher .gt_selected {
	background: none !important;
	border: none !important;
	width: auto !important;
	height: auto !important;
}

.gt_switcher .gt_selected a {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	width: auto !important;
	height: auto !important;
	background: rgba(255, 255, 255, .14) !important;
	border: 1px solid rgba(255, 255, 255, .18) !important;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-radius: 999px !important;
	padding: 8px 13px 8px 9px !important;
	color: #fff !important;
	text-decoration: none !important;
	font-size: 0 !important;
	line-height: 1 !important;
	transition: background .25s ease;
}

.gt_switcher .gt_selected a:hover {
	background: rgba(255, 255, 255, .26) !important;
}

.gt_switcher .gt_selected a::after {
	display: none !important;
	content: none !important;
}

.gt_switcher .gt_selected a img {
	width: 20px !important;
	height: 20px !important;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 !important;
}

.gtx-lab {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	color: #fff;
}

.gtx-ch {
	width: 8px;
	height: 8px;
	flex: none;
	border-right: 1.5px solid rgba(255, 255, 255, .85);
	border-bottom: 1.5px solid rgba(255, 255, 255, .85);
	transform: rotate(45deg) translateY(-2px);
	transition: transform .25s ease;
}

.gt_switcher.gtx-open .gtx-ch {
	transform: rotate(-135deg) translateY(-2px);
}

.gt_switcher .gt_option {
	position: absolute !important;
	top: calc(100% + 10px);
	right: 0;
	left: auto !important;
	width: auto !important;
	min-width: 172px;
	display: block !important;
	height: auto !important;
	max-height: none !important;
	overflow: hidden !important;
	background: rgba(13, 27, 42, .92) !important;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border: 0 !important;
	border-radius: 12px;
	padding: 6px !important;
	margin: 0 !important;
	box-shadow: 0 16px 34px rgba(0, 0, 0, .45);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-8px) scale(.97);
	transform-origin: top right;
	transition: opacity .22s ease, transform .22s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .25s;
	z-index: 1001;
}

.gt_switcher.gtx-open .gt_option {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition-delay: 0s;
}

.gt_switcher .gt_option a {
	display: flex !important;
	align-items: center;
	gap: 10px;
	padding: 9px 12px !important;
	border-radius: 8px;
	background: none !important;
	color: #E6EAF0 !important;
	font-size: 14px !important;
	line-height: 1.3 !important;
	text-decoration: none !important;
	opacity: 0;
	transform: translateY(-5px);
	transition: background .18s ease, opacity .25s ease, transform .25s ease;
}

.gt_switcher.gtx-open .gt_option a { opacity: 1; transform: none; }
.gt_switcher.gtx-open .gt_option a:nth-child(1) { transition-delay: .05s; }
.gt_switcher.gtx-open .gt_option a:nth-child(2) { transition-delay: .11s; }
.gt_switcher.gtx-open .gt_option a:nth-child(3) { transition-delay: .17s; }
.gt_switcher .gt_option a:hover { background: rgba(137, 200, 237, .15) !important; }

.gt_switcher .gt_option a img {
	width: 20px !important;
	height: 20px !important;
	border-radius: 50%;
	object-fit: cover;
}

.gt_switcher .gt_option a.gt_current {
	color: var(--tsm-secondary) !important;
	font-weight: 600;
}

/* ==========================================================================
   Homepage
   ========================================================================== */

.hero-slider {
	position: relative;
	margin-top: calc(var(--tsm-header-overlap) * -1);
	overflow: hidden;
	background: var(--tsm-bg);
}

.hero-slider::after,
.tsm-banner::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 220px;
	background: var(--tsm-grad);
	-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .65) 55%, #000 100%);
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .65) 55%, #000 100%);
	pointer-events: none;
	z-index: 3;
}

.hero-slider__slides {
	display: grid;
}

.hero-slide {
	grid-area: 1 / 1;
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding: 5%;
	background-color: var(--tsm-bg);
	background-position: center left;
	background-size: cover;
	background-repeat: no-repeat;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.2s ease, visibility 1.2s;
}

.hero-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.hero-slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--tsm-dark) 5%, rgba(0, 0, 0, 0) 65%);
	opacity: .85;
}

.hero-slide__content {
	position: relative;
	z-index: 2;
	width: 100%;
	margin-top: 5%;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.hero-slide__title {
	max-width: 470px;
	font-size: 3rem;
	line-height: 1.2;
}

.hero-slide__text {
	max-width: 430px;
	font-size: 1.125rem;
}

.hero-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 60px;
	height: 60px;
	padding: 20px;
	border: 0;
	border-radius: 6px;
	background: rgba(255, 255, 255, .18);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .25s;
}

.hero-arrow:hover {
	background: rgba(255, 255, 255, .3);
}

.hero-arrow img {
	width: 20px;
	height: auto;
}

.hero-arrow--prev { left: 0; }
.hero-arrow--next { right: 0; }

/* Tablets and phones: arrows in the bottom right corner, away from the slide text */
@media (max-width: 1200px) {
	.hero-arrow { width: 44px; height: 44px; padding: 12px; top: auto; bottom: 24px; transform: none; }
	.hero-arrow--prev { left: auto; right: 64px; }
	.hero-arrow--next { right: 20px; }
}

/* Photo with a card overlapping its bottom edge */
.col--overlap {
	position: relative;
	align-items: center;
}

.media-tall {
	display: block;
	width: 100%;
	height: 600px;
	object-fit: cover;
	object-position: top center;
}

.media-425 {
	display: block;
	width: 100%;
	height: 425px;
	object-fit: cover;
	object-position: top center;
}

.overlap-card {
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 90%;
	padding: 25px 20px;
	background: var(--tsm-bg);
	border-radius: 15px 15px 0 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.overlap-card__title {
	width: 80%;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
	color: rgba(255, 255, 255, .6);
	text-align: center;
}

.tsm-partners__logos {
	width: 90%;
	display: flex;
	gap: 40px;
}

.tsm-partners__logos > a,
.tsm-partners__logos > span {
	flex: 1 1 0;
	display: flex;
	justify-content: center;
}

.tsm-partners__logos img {
	height: 75px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	opacity: .5;
	transition: opacity .3s;
}

.tsm-partners__logos a:hover img {
	opacity: 1;
}

.stats {
	flex-direction: row;
	gap: 20px;
}

.stat {
	flex: 1 1 0;
	margin: 30px 0 20px;
	text-align: center;
}

.stat__number {
	font-family: var(--tsm-font-head);
	font-size: 3.125rem;
	font-weight: 600;
	line-height: 1;
	color: var(--tsm-secondary);
}

.stat__label {
	font-family: var(--tsm-font-head);
	font-size: 1rem;
	font-weight: 500;
	line-height: 2.5;
	color: var(--tsm-text);
}

.sec--glance .tsm-text,
.glance-caption {
	max-width: 560px;
}

.glance-logo img {
	display: block;
	width: 200px;
}

.glance-caption {
	margin: 0 0 .9rem;
	font-size: 1rem;
	color: #fff;
}


/* Cards (business, discover, process, albums, jobs) */
.cards {
	display: grid;
	gap: 20px;
}

.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }

.card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px;
	min-width: 0;
}

.card__image {
	display: block;
	width: 100%;
	height: 300px;
	object-fit: cover;
}

.card__body {
	position: relative;
	width: 90%;
	margin-top: -80px;
	padding: 30px 40px;
	background: var(--tsm-bg);
	border-radius: 15px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.card--business .card__body {
	min-height: 360px;
	justify-content: space-between;
}

.cards--compact .card--business .card__body {
	min-height: 0;
}

.card__top {
	min-height: 180px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.card--discover .card__body {
	gap: 30px;
}

.card--album,
.card--job {
	padding: 0;
}

.card--process .card__image,
.card--album .card__image,
.card--job .card__image {
	height: 260px;
}

.card--process .card__body,
.card--album .card__body,
.card--job .card__body {
	min-height: 130px;
}

.card--album .card__body,
.card--job .card__body {
	gap: 20px;
}

.card h3 a {
	color: inherit;
	text-decoration: none;
}

.card h3 a:hover {
	color: var(--tsm-secondary);
}

.card__clamp {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	height: 65px;
}

.card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .875rem;
	color: #fff;
}

.card__meta svg {
	width: 12px;
	height: 14px;
	flex: none;
}

/* Bottom banner */
.home-banner {
	min-height: 60vh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
}

.home-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--tsm-dark) 0%, rgba(10, 10, 10, 0) 60%);
	opacity: .7;
}

.home-banner .wrap {
	padding-left: 10px;
	padding-right: 10px;
}

.home-banner__title {
	position: relative;
	max-width: 620px;
	margin-bottom: 20px;
	font-weight: 500;
	font-style: italic;
}

/* ==========================================================================
   Inner pages
   ========================================================================== */

.tsm-banner {
	position: relative;
	z-index: 0;
	min-height: 100vh;
	display: flex;
	align-items: flex-end;
	margin-top: calc(var(--tsm-header-overlap) * -1);
	padding: 0 5%;
	background-color: var(--tsm-bg);
	background-size: cover;
	background-repeat: no-repeat;
}

.tsm-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--tsm-dark) -5%, rgba(0, 0, 0, 0) 55%);
	opacity: .8;
	z-index: 1;
}

.tsm-banner.contact::after {
	background: var(--tsm-bg);
}

.tsm-banner__inner {
	position: relative;
	z-index: 4;
	width: 100%;
	max-width: 1600px;
	margin: 5% auto 8%;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.tsm-banner__title {
	max-width: 500px;
	font-size: 3rem;
	line-height: 1.2;
}

.tsm-banner--wide .tsm-banner__title {
	max-width: 850px;
}

.tsm-banner__subtitle {
	margin: 0;
}

.tsm-banner__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 1.125rem;
	color: #fff;
}

.tsm-banner__meta svg {
	width: 15px;
	height: 20px;
}

/* Thin arrow running from the banner into the page */
.scroll-line {
	position: absolute;
	left: 3%;
	top: var(--line-top, -15%);
	z-index: 99;
	width: 8px;
	height: 300px;
	object-fit: contain;
	pointer-events: none;
}

/* Photos in rows */
.media {
	display: block;
	width: 100%;
	object-fit: cover;
	object-position: top center;
}

.media-450 { height: 450px; }
.media-550 { height: 550px; }
.media-600 { height: 600px; }
.media-350 { height: 350px; object-position: bottom center; }
.media-auto { height: auto; }

/* About: video */
/* Keep the video's bottom margin inside the section (otherwise a dark line shows under it). */
.sec--video {
	display: flow-root;
}

.sec--video .video-embed {
	margin: 10px;
	width: auto;
}

.video-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.video-embed iframe,
.video-embed__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.video-embed__play {
	padding: 0;
	cursor: pointer;
	background: #000 center / cover no-repeat;
}

.video-embed__icon {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 84px;
	height: 60px;
	transform: translate(-50%, -50%);
	border-radius: 16px;
	background: rgba(23, 23, 23, .8);
	transition: background .2s;
}

.video-embed__icon::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-35%, -50%);
	border-style: solid;
	border-width: 13px 0 13px 22px;
	border-color: transparent transparent transparent #fff;
}

.video-embed__play:hover .video-embed__icon {
	background: #f00;
}

/* Core values */
.values-image {
	display: block;
	width: 100%;
}

.values-intro {
	margin: 20px 0 40px;
}

.values-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.value,
.why {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px;
}

.value__icon {
	width: 110px;
	margin-bottom: 20px;
}

.why__icon {
	width: 50px;
	margin-bottom: 20px;
}

/* Text widths of the original design */
.value .tsm-text { max-width: 200px; }
.value:nth-child(3) .tsm-text { max-width: 175px; }
.value:nth-child(7) .tsm-text { max-width: 180px; }
.media-row-text .tsm-text { max-width: 485px; }
.sec-head .h2.text-center { max-width: 476px; }
.footer-address { max-width: 320px; }

.value__title {
	font-size: 1.25rem;
	line-height: 1.3;
}

.why-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 50px;
}

.why {
	gap: 20px;
}

/* Management */
.person {
	display: flex;
	align-items: center;
	padding: 10px;
}

/* Photo 30% + card 90%, shrunk together like the original layout. */
.person__photo {
	flex: 0 1 30%;
	min-width: 0;
	height: auto;
	display: block;
}

.person__card {
	flex: 0 1 90%;
	min-width: 0;
	min-height: 365px;
	padding: 30px 40px;
	background: var(--tsm-bg);
	border-radius: 15px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.person__head {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 10px;
}

.person__position {
	margin: 0;
	font-family: var(--tsm-font-head);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	color: var(--tsm-secondary);
}

/* CSR */
.tsm-banner--csr {
	align-items: center;
	justify-content: center;
	background: var(--tsm-grad);
}

.tsm-banner--csr .tsm-banner__inner {
	margin: 5% auto 0;
}

.tsm-banner--csr .tsm-banner__inner {
	width: 100%;
	flex-direction: row;
	gap: 20px;
	padding: 0;
	max-width: 1600px;
}

.csr-thumbs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	padding: 10px;
}

.csr-thumb {
	position: relative;
	display: block;
}

.csr-thumb img {
	display: block;
	width: 100%;
	height: 190px;
	object-fit: cover;
}

.csr-thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none; /* So the photo underneath can be edited. */
	background: rgba(13, 27, 42, .35) url("../img/arrow-down-circle.svg") center / 50px no-repeat;
	opacity: 0;
	transition: opacity .3s;
}

.csr-thumb:hover::after,
.csr-thumb:focus-visible::after {
	opacity: 1;
}

.csr-nav {
	background: var(--tsm-bg);
	border-bottom: 1px solid rgba(255, 255, 255, .23);
}

.csr-nav .wrap {
	padding-left: 10px;
	padding-right: 10px;
}

.csr-nav__list {
	padding: 10px 0 30px !important;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 35px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.csr-nav__list a {
	font-family: var(--tsm-font-head);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
}

.csr-nav__list a:hover {
	color: var(--tsm-secondary);
}

#education,
#environment,
#health,
#entrepreneurship {
	scroll-margin-top: 120px;
}

/* Logistics process carousels */
.process-block {
	padding: 10px;
}

.process-title {
	font-family: var(--tsm-font-head);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1;
	color: var(--tsm-heading);
}

.carousel {
	position: relative;
	--per-view: 4;
	--gap: 10px;
}

.carousel__viewport {
	overflow: hidden;
}

.carousel__track {
	display: flex;
	gap: var(--gap);
	transition: transform .5s ease;
	will-change: transform;
}

.carousel__slide {
	flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
	min-width: 0;
}

.carousel__arrow {
	position: absolute;
	top: calc(50% - 10px);
	z-index: 2;
	width: 45px;
	height: 45px;
	padding: 10px;
	margin-top: -22px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .18);
	color: #fff;
	cursor: pointer;
	transition: background .25s, opacity .25s;
}

.carousel__arrow svg {
	width: 14px;
	height: 22px;
}

.carousel__arrow:hover {
	background: rgba(255, 255, 255, .3);
}

.carousel__arrow--prev { left: -30px; }
.carousel__arrow--next { right: -30px; }

.carousel.is-static .carousel__arrow,
.carousel.is-static .carousel__dots {
	display: none;
}

.carousel__dots {
	display: flex;
	justify-content: center;
	gap: 0;
	margin-top: 10px;
}

/* A 10px dot inside a 24px button, so it is easy to tap. */
.carousel__dot {
	width: 24px;
	height: 24px;
	padding: 7px;
	background-clip: content-box !important;
	border: 0;
	border-radius: 50%;
	background: var(--tsm-secondary);
	opacity: .2;
	cursor: pointer;
}

.carousel__dot.is-active {
	opacity: 1;
}

/* Filter tabs (gallery, jobs) */
.filter-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 30px;
}

.filter-tab {
	padding: 0;
	border: 0;
	background: transparent;
	font-family: var(--tsm-font-head);
	font-size: 1.325rem;
	font-weight: 600;
	line-height: 1.32;
	text-transform: capitalize;
	color: rgba(255, 255, 255, .61);
	cursor: pointer;
	transition: color .3s;
}

.filter-tab:hover,
.filter-tab.is-active {
	color: #fff;
}

.is-filtered-out,
.is-paged-out {
	display: none !important;
}

.load-more {
	align-self: center;
	margin-top: 10px;
}

/* Album photos */
.album-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 25px;
}

.album-photo {
	display: block;
	overflow: hidden;
}

.album-photo img {
	display: block;
	width: 100%;
	height: 250px;
	object-fit: cover;
	transition: transform .5s ease;
}

.album-photo:hover img {
	transform: scale(1.04);
}

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(5, 10, 18, .94);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s, visibility .3s;
}

.lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.lightbox img {
	max-width: 90vw;
	max-height: 86vh;
	object-fit: contain;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.lightbox button {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	width: 52px;
	height: 52px;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox button svg {
	width: 20px;
	height: 20px;
}

.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; margin-top: -26px; }
.lightbox__next { right: 20px; top: 50%; margin-top: -26px; }

/* Career */
.jobs-box {
	margin-top: -100px;
	padding: 50px;
	background: var(--tsm-bg);
	border-radius: 20px 20px 0 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.jobs-box > .h2 { margin-bottom: 20px; }
.jobs-box > .filter-tabs { margin-bottom: 30px; }

.jobs-list {
	margin: 0 0 20px;
}

.jobs-questions {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.jobs-empty {
	margin: 10px 0 20px;
}

/* "Life at TSM" collage */
.lat {
	--deep: #0A1520;
	background: var(--deep);
	overflow: hidden;
	position: relative;
	z-index: 10;
}

.lat-stage {
	position: relative;
	max-width: 1440px;
	height: 900px;
	margin: 0 auto;
}

.lat-back {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	opacity: .22;
}

.lat-vignette {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center, rgba(10, 21, 32, .15) 0%, rgba(10, 21, 32, .55) 45%, rgba(10, 21, 32, .9) 72%, #0A1520 90%);
}

.lat-doodle {
	position: absolute;
	left: 220px;
	top: 120px;
	width: 1000px;
	height: 620px;
	opacity: .9;
	pointer-events: none;
}

.ldl {
	transform-origin: 50% 50%;
	transform-box: fill-box;
	transition: opacity .45s ease var(--dd, 0s), transform .45s ease var(--dd, 0s);
}

.lat-stage.out .ldl { opacity: 0; transform: scale(.94); transition-delay: 0s; }
.lat-stage.pre .ldl { opacity: 0; transform: scale(.94); transition: none; }

.lat-p {
	position: absolute;
	background: #fff;
	border-radius: 4px;
	padding: 12px 12px 46px;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
	opacity: 0;
	transform: rotate(var(--r)) translateY(36px) scale(.85);
	transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1), filter .5s ease;
	will-change: transform, opacity;
}

.lat-p.in { opacity: 1; transform: rotate(var(--r)) translateY(0) scale(1); }
.lat-p img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lat-p.dim { opacity: 1; filter: brightness(.85); }
.lat-p.hot { opacity: 1; filter: brightness(1.05); transform: rotate(var(--r)) translateY(0) scale(1.05); z-index: 5; }

.lat-center {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -52%);
	width: 600px;
	max-width: 90%;
	text-align: center;
	z-index: 6;
}

.lat-clip { display: block; overflow: hidden; margin: 14px 0 22px; }

.lat-eyebrow {
	font-family: var(--tsm-font-body);
	font-size: 15px;
	letter-spacing: .14em;
	color: var(--tsm-text);
	transition: transform .35s ease 0s, opacity .35s ease 0s;
}

.lat-title {
	font-family: var(--tsm-font-head);
	font-weight: 600;
	font-size: 52px;
	line-height: 1.2;
	color: #fff;
	margin: 0;
	transition: transform .5s cubic-bezier(.22, .61, .36, 1) .18s, opacity .4s ease .18s;
}

.lat-items {
	font-family: var(--tsm-font-body);
	font-size: 18px;
	line-height: 27px;
	color: var(--tsm-text);
	transition: transform .45s cubic-bezier(.22, .61, .36, 1) .38s, opacity .4s ease .38s;
}

.lat-dots {
	display: flex;
	justify-content: center;
	gap: 0;
	margin-top: 36px;
	transition: opacity .35s ease .58s, transform .45s cubic-bezier(.22, .61, .36, 1) .58s;
}

.lat-center.out .lat-eyebrow { opacity: 0; transform: translateY(-10px); transition-delay: 0s; }
.lat-center.out .lat-title { transform: translateY(-115%); opacity: 0; transition-delay: 0s; }
.lat-center.out .lat-items { transform: translateY(16px); opacity: 0; transition-delay: 0s; }
.lat-center.out .lat-dots { opacity: 0; transform: translateY(10px); transition-delay: 0s; }
.lat-center.pre .lat-eyebrow { opacity: 0; transform: translateY(10px); }
.lat-center.pre .lat-title { transform: translateY(115%); opacity: 0; }
.lat-center.pre .lat-items { transform: translateY(18px); opacity: 0; }
.lat-center.pre .lat-dots { opacity: 0; transform: translateY(12px); }

.lat .lat-dot {
	width: 24px;
	height: 24px;
	padding: 7px;
	background-clip: content-box !important;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .3);
	cursor: pointer;
	transition: transform .3s, background .3s;
}

.lat .lat-dot.on {
	background: var(--tsm-secondary);
	transform: scale(1.5);
}

.lat .lat-prev,
.lat .lat-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 65px;
	height: 65px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 4px;
	background: rgba(255, 255, 255, .18);
	color: #fff;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	font-family: var(--tsm-font-head);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 7;
	transition: background .25s;
}

.lat .lat-prev { left: 0; }
.lat .lat-next { right: 0; }
.lat .lat-prev:hover,
.lat .lat-next:hover { background: rgba(255, 255, 255, .3); }

/* History road */
.trt {
	--navy: var(--tsm-bg);
	--blue: var(--tsm-primary);
	--sky: var(--tsm-secondary);
	background: var(--navy);
	padding: 70px 0 90px;
	overflow: hidden;
	position: relative;
	z-index: 10;
}

.trt-canvas {
	position: relative;
	max-width: 1440px;
	margin: 0 auto;
	aspect-ratio: 1440 / 1160;
}

.trt-road { position: absolute; inset: 0; width: 100%; height: 100%; }
.trt-asphalt { fill: none; stroke: var(--blue); stroke-width: 46; stroke-linecap: round; opacity: .55; }
.trt-marks { fill: none; stroke: var(--sky); stroke-width: 3; stroke-dasharray: 16 14; stroke-linecap: round; opacity: .5; }
.trt-progress { fill: none; stroke: var(--sky); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(137, 200, 237, .8)); }
.trt-car { fill: #fff; }
.trt-car-glow { fill: rgba(137, 200, 237, .35); }

.trt-start,
.trt-flag {
	position: absolute;
	font-family: var(--tsm-font-head);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .08em;
	color: var(--sky);
}

.trt-start { left: 2.5%; top: 9.5%; }
.trt-flag { left: 74%; top: 87.5%; font-size: 26px; line-height: 1; }
.trt-flag em { display: block; font-style: normal; font-size: 11px; margin-top: 2px; }

.trt-stop {
	position: absolute;
	width: 240px;
	margin-left: -120px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
	opacity: 0;
	transform: translateY(26px);
	transition: opacity .7s ease, transform .7s ease;
}

.trt-stop.is-up { flex-direction: column-reverse; transform: translateY(-26px); }
.trt-stop.is-visible { opacity: 1; transform: translateY(0); }

.trt-dot {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--navy);
	border: 3px solid var(--sky);
	box-shadow: 0 0 0 4px rgba(137, 200, 237, .15);
	flex: none;
}

.trt-logo {
	width: 72px;
	height: 72px;
	border-radius: 14px;
	flex: none;
	background: var(--navy);
	border: 1.5px dashed rgba(137, 200, 237, .55);
	display: flex;
	align-items: center;
	justify-content: center;
}

.trt-logo img { max-width: 56px; max-height: 56px; object-fit: contain; }
.trt-logo span { font-family: var(--tsm-font-body); font-size: 11px; color: var(--tsm-text); }
.trt-year { font-family: var(--tsm-font-head); font-weight: 600; font-size: 30px; color: #fff; line-height: 1.1; }
.trt-desc { font-family: var(--tsm-font-body); font-size: 14px; line-height: 1.45; color: var(--tsm-text); margin: 0; }
.trt-mobile { display: none; }

.trt-noscript {
	max-width: 600px;
	margin: 0 auto;
}

/* Contact */
.contact-form-col {
	flex: 2 1 0;
	padding: 0 10px;
	gap: 50px;
}

.contact-info-col {
	flex: 1 1 0;
	gap: 60px;
}

.h-small {
	font-size: 1.25rem;
	line-height: 1;
}

.icon-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 15px;
	font-size: 1rem;
}

.icon-list li {
	display: flex;
	align-items: flex-start;
	gap: 15px;
}

.icon-list svg {
	width: 17px;
	height: 17px;
	flex: none;
	margin-top: 4px;
	color: #fff;
}

.icon-list a {
	color: inherit;
	text-decoration: none;
}

.icon-list a:hover {
	color: var(--tsm-secondary);
}

.icon-list__text p {
	margin: 0;
}

.contact-map iframe {
	display: block;
	width: 100%;
	height: 450px;
	border: 0;
	filter: grayscale(.2);
}

/* Forms */
.tsm-form {
	width: 100%;
}

.form-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
	row-gap: 30px;
}

.form-field {
	flex: 0 0 100%;
	padding: 0 15px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.form-field--half {
	flex-basis: 50%;
}

.form-field label {
	font-size: 1rem;
	line-height: 1;
	color: var(--tsm-text);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea,
.form-field input[type="file"] {
	width: 100%;
	min-height: 40px;
	padding: 6px 14px;
	font-size: 15px;
	line-height: 1.4;
	color: #fff;
	background: rgba(255, 255, 255, .22);
	border: 0;
	border-radius: 3px;
}

.form-field input[type="file"] {
	padding: 6px 8px;
	font-size: 14px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
	color: rgba(255, 255, 255, .55);
}

.form-field input:focus,
.form-field textarea:focus {
	outline: 2px solid var(--tsm-secondary);
	outline-offset: 0;
}

.form-field--check label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	line-height: 1.5;
	cursor: pointer;
}

.form-field--check input {
	margin-top: 5px;
}

.form-field--submit .form-submit {
	width: 25%;
	min-width: 150px;
	justify-content: center;
	padding-top: 12px;
	padding-bottom: 12px;
	font-size: .875rem;
}

.form-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-message {
	margin: 0 0 30px;
	padding: 14px 18px;
	border-radius: 6px;
	color: #fff;
	font-size: 1rem;
}

.form-message--ok { background: rgba(46, 160, 67, .25); border-left: 4px solid #2ea043; }
.form-message--error { background: rgba(214, 54, 56, .2); border-left: 4px solid #d63638; }

/* Page text (Privacy, job descriptions) */
.entry-content h2 {
	font-family: var(--tsm-font-body);
	font-weight: 500;
	font-size: 2rem;
	line-height: 1.4;
	color: var(--tsm-text);
	margin: .5rem 0 1rem;
}

.entry-content h3,
.entry-content h4 {
	margin: 1.4em 0 .6em;
	line-height: 1.3;
}

.entry-content strong {
	font-weight: 700;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 .9rem;
	padding-left: 1.4em;
}

.entry-content a {
	color: var(--tsm-secondary);
}



/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	color: var(--tsm-text);
}

.footer-main {
	display: flex;
	gap: 20px;
	padding: 4.5vw 5%;
	border-bottom: 1px solid rgba(255, 255, 255, .18);
	background: url("../img/globe.png") no-repeat 130% -207px / 40% auto;
}

.footer-office {
	flex: 0 0 28.4%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 10px;
}

.footer-logo {
	min-height: 110px;
}

.footer-logo img {
	width: 90%;
	max-width: 309px;
	filter: brightness(0) invert(1);
}

.footer-links {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 10px;
}

.footer-logo-spacer {
	min-height: 110px;
}

.footer-columns {
	display: flex;
	gap: 20px;
	padding-right: 10%;
}

.footer-column {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.footer-title {
	font-size: 1rem;
	line-height: 1;
	color: #fff;
}

.footer-title a {
	color: inherit;
	text-decoration: none;
}

.footer-title a:hover {
	color: var(--tsm-secondary);
}

.footer-address {
	font-size: 1rem;
	line-height: 1.5;
}

.footer-address p {
	margin-bottom: .9rem;
}

.footer-address a {
	color: inherit;
	text-decoration: none;
}

.footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.footer-list a {
	font-family: var(--tsm-font-head);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	color: var(--tsm-text);
	text-decoration: none;
}

.footer-list a:hover {
	color: var(--tsm-secondary);
}

.social-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10%;
	color: #fff;
}

.social-icon svg {
	width: 20px;
	height: 20px;
}

a.social-icon:hover {
	color: var(--tsm-secondary);
}

.contact-info-col .social-icon {
	width: 20px;
	height: 20px;
}

.footer-bottom {
	display: flex;
	gap: 20px;
	padding: 2.7vw 5%;
	font-size: 1rem;
}

.footer-bottom p {
	flex: 1 1 0;
	margin: 0;
	padding: 10px;
}

.footer-privacy {
	text-align: right;
}

.footer-privacy,
.footer-privacy a {
	font-family: var(--tsm-font-head);
	font-weight: 500;
	color: var(--tsm-text);
	text-decoration: none;
}

.footer-privacy a:hover {
	color: var(--tsm-secondary);
}

/* ==========================================================================
   Wide screens (≥1600px)
   ========================================================================== */

@media (min-width: 1600px) {
	:root {
		--tsm-body-size: 1.25rem;
		--tsm-header-overlap: 110px;
	}

	h1, .h1, .hero-slide__title, .tsm-banner__title { font-size: 3.125rem; }
	h2, .h2 { font-size: 2.125rem; }
	h3, .h3 { font-size: 1.625rem; }
	h4, .h4 { font-size: 1.125rem; }

	.sec { padding-left: var(--pxw, 10%); padding-right: var(--pxw, 10%); }
	.sec--history { padding-left: 0; padding-right: 0; }
	.hero-slide { padding: 5% 10%; }
	.tsm-banner { padding: 0 10%; }
	.tsm-banner--csr .tsm-banner__inner { margin-bottom: 8%; }
	.footer-main { padding: 4vw 10%; background-position: 120% -280px; }
	.footer-bottom { padding: 2.4vw 10%; }

	.menu-link,
	.dropdown__links a,
	.csr-nav__list a { font-size: 1.125rem; }
	.csr-nav__list { gap: 10px 50px; }

	.hero-slide__text { font-size: 1.25rem; }
	.media-tall { height: 650px; }
	.media-425 { height: 450px; }
	.media-350 { height: 400px; }
	.card__image { height: 350px; }
	.card--process .card__image,
	.card--album .card__image,
	.card--job .card__image { height: 260px; }
	.card--business .card__body { min-height: 320px; }
	.card__top { min-height: 195px; }
	.overlap-card__title { font-size: 1.25rem; }
	.stat__number { font-size: 3.25rem; }
	.stat__label,
	.footer-list a,
	.footer-address,
	.footer-bottom,
	.icon-list { font-size: 1.125rem; }
	.value__title { font-size: 1.325rem; }
	.process-title { font-size: 1.325rem; }
	.person__card { min-height: 390px; }
	.csr-thumb img { height: 250px; }
	.why-grid { gap: 5%; }
	.hero-slide__title { max-width: 520px; }
	.hero-slide__text { max-width: 480px; }
	.value .tsm-text { max-width: 210px; }
	.value:nth-child(2) .tsm-text { max-width: 260px; }
	.value:nth-child(3) .tsm-text { max-width: 200px; }
	.value:nth-child(n+4) .tsm-text { max-width: 200px; }
	.value:nth-child(7) .tsm-text { max-width: 180px; }
	.media-row-text .tsm-text { max-width: 500px; }
	.footer-address { max-width: 340px; }
	.scroll-line { left: 8%; }
	.icon-list svg { width: 20px; height: 20px; }
}

/* ==========================================================================
   Tablet (≤1200px)
   ========================================================================== */

@media (max-width: 1200px) {
	:root {
		--tsm-body-size: 1rem;
	}

	h1, .h1, .hero-slide__title, .tsm-banner__title { font-size: 2.25rem; }
	h2, .h2 { font-size: 1.675rem; }
	h3, .h3 { font-size: 1.25rem; }
	h4, .h4 { font-size: .875rem; }

	.row--100 { gap: 30px; }

	/* Header: menu button */
	.tsm-navbar { padding: 16px 24px; gap: 8px; }
	.tsm-navbar > * { min-height: 0; }
	.tsm-logo { flex: 0 1 25%; padding: 0; }
	.tsm-logo img { width: 128px; }
	.tsm-menu { flex: 1 1 auto; justify-content: flex-end; }
	.tsm-translate { flex: 0 0 auto; }

	.menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 7px;
		border: 0;
		background: transparent;
		color: #fff;
		cursor: pointer;
	}

	.menu-toggle svg { width: 30px; height: 30px; }
	.menu-toggle__close { display: none; }
	.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
	.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: inline-flex; }

	.menu-list {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		flex-direction: column;
		gap: 0;
		padding: 10px 0 20px;
		background: var(--tsm-bg);
		box-shadow: 0 16px 30px rgba(0, 0, 0, .35);
		max-height: calc(100vh - 80px);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity .25s ease, transform .25s ease, visibility .25s;
	}

	.tsm-menu.is-open .menu-list {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.menu-item { width: 100%; text-align: center; }
	.menu-link { justify-content: center; width: 100%; padding: 8px 16px; }

	.dropdown {
		position: static;
		opacity: 1;
		visibility: visible;
		display: none;
	}

	.menu-item.is-open > .dropdown { display: block; }

	.dropdown__inner {
		padding: 4px 0 10px;
		background: transparent;
		box-shadow: none;
		justify-content: center;
	}

	.dropdown__heading { display: none; }
	.dropdown__links { align-items: center; padding: 0; gap: 6px; }

	/* Content */
	.hero-slide {
		min-height: 570px;
		flex-direction: column-reverse;
		justify-content: center;
		align-items: flex-start;
	}

	.hero-slide__content { width: 100%; }
	.hero-slide__text { max-width: none; }
	.home-banner { min-height: 400px; }
	.home-banner__title { max-width: 80%; }

	.sec--home-about { --pt: 8% !important; --pb: 8% !important; }
	.sec--home-about .col--overlap { flex: 0 0 75%; }

	.cards--3 { grid-template-columns: 1fr; }
	.cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tsm-partners__logos img { height: 65px; }

	.tsm-banner__inner { width: 75%; }
	.values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

	.footer-main { flex-wrap: wrap; background-position: 200% -200px; background-size: 75% auto; }
	.footer-office { flex-basis: 100%; }
	.footer-links { flex-basis: 100%; padding: 0; }
	.footer-logo-spacer { display: none; }
	.footer-logo { min-height: 0; margin-bottom: 10px; }
}

@media (max-width: 1023px) {
	.trt-canvas,
	.trt-start { display: none; }

	.trt-mobile {
		display: block;
		max-width: 480px;
		margin: 30px auto 0;
		padding: 0 24px;
		position: relative;
	}

	.trt-mobile::before {
		content: "";
		position: absolute;
		left: 34px;
		top: 10px;
		bottom: 10px;
		border-left: 3px dashed rgba(137, 200, 237, .5);
	}

	.trt-mstop {
		position: relative;
		padding: 0 0 34px 46px;
		opacity: 0;
		transform: translateY(20px);
		transition: opacity .6s ease, transform .6s ease;
	}

	.trt-mstop.is-visible { opacity: 1; transform: translateY(0); }

	.trt-mstop::before {
		content: "";
		position: absolute;
		left: 2px;
		top: 6px;
		width: 14px;
		height: 14px;
		border-radius: 50%;
		background: var(--navy);
		border: 3px solid var(--sky);
	}

	.trt-mstop .trt-logo { width: 56px; height: 56px; margin-bottom: 8px; }
	.trt-mstop .trt-logo img { max-width: 42px; max-height: 42px; }
	.trt-mstop .trt-year { font-size: 24px; }

	.lat-stage { height: 760px; }
	.lat-doodle { display: none; }
	.lat-p { display: none; }
	.lat-p[data-i="0"],
	.lat-p[data-i="8"] { display: block; transform: rotate(var(--r)) scale(.7); }
	.lat-p[data-i="0"].in,
	.lat-p[data-i="8"].in { transform: rotate(var(--r)) scale(.7); }
	.lat-title { font-size: 32px; }
	.lat .lat-prev,
	.lat .lat-next { width: 48px; height: 48px; }
}

/* ==========================================================================
   Mobile (≤767px)
   ========================================================================== */

@media (max-width: 767px) {
	:root {
		--tsm-body-size: .875rem;
	}

	h1, .h1, .hero-slide__title, .tsm-banner__title { font-size: 1.825rem; }
	h2, .h2 { font-size: 1.5rem; }
	h3, .h3 { font-size: 1.125rem; }

	.sec { padding-left: 20px; padding-right: 20px; }
	.sec--history { padding-left: 0; padding-right: 0; }
	.sec > .wrap { padding-top: max(var(--pt, 7%), 40px); padding-bottom: max(var(--pb, 7%), 40px); }

	.row,
	.row--100 {
		flex-direction: column;
		gap: 40px;
	}

	.col { flex: 0 0 auto; width: 100%; }

	.tsm-navbar { padding: 10px 20px; gap: 0; }
	.tsm-logo { flex: 0 1 50%; }
	.tsm-logo img { width: 120px; }

	.hero-slide { padding: 90px 20px 60px; }
	.hero-slide__content { width: 100%; }
	.hero-slider::after { height: 140px; }
	.hero-arrow { width: 44px; height: 44px; padding: 12px; top: auto; bottom: 24px; transform: none; }
	.hero-arrow--prev { left: auto; right: 64px; }
	.hero-arrow--next { right: 20px; }

	.media-tall { height: 380px; }
	.media-425 { height: 320px; }
	.media-450,
	.media-550,
	.media-600 { height: 300px; }

	.col--overlap { padding-bottom: 0; }
	.overlap-card { position: relative; left: auto; transform: none; margin-top: -60px; }
	.tsm-partners__logos { flex-direction: column; align-items: center; gap: 20px; }
	.tsm-partners__logos img { height: 60px; }
	.stats { flex-direction: column; gap: 0; }
	.stat { margin: 10px 0; }

	.cards--4 { grid-template-columns: 1fr; }
	.card__body { padding: 24px 26px; }
	.card--business .card__body { min-height: 0; }
	.card__top { min-height: 0; }

	.home-banner .wrap { padding-left: 0; padding-right: 0; }
	.home-banner__title { max-width: 100%; }

	.tsm-banner { padding: 0 20px; min-height: 80vh; }
	.tsm-banner__inner { margin: 120px 0 60px; }
	.tsm-banner__inner { width: 100%; }
	.tsm-banner--csr .tsm-banner__inner { flex-direction: column; }
	.csr-thumb img { height: 130px; }
	.scroll-line { display: none; }

	.why-grid { grid-template-columns: 1fr; gap: 20px; }
	/* Core values: two columns on phones, to save space */
	.values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
	.value { padding: 0; }
	.value__icon { width: 64px; margin-bottom: 8px; }
	.value__title { font-size: 1.125rem; }
	.value .tsm-text,
	.value:nth-child(n) .tsm-text { max-width: none; font-size: 1rem; }

	.person { flex-direction: column; align-items: stretch; }
	.person__photo { max-width: 100%; width: 100%; }
	.person__card { min-height: 0; padding: 24px; border-radius: 0 0 15px 15px; }

	.carousel__arrow--prev { left: -8px; }
	.carousel__arrow--next { right: -8px; }

	.jobs-box { padding: 30px 20px; margin-top: -60px; }
	.album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.album-photo img { height: 160px; }

	.form-field--half { flex-basis: 100%; }
	.form-field--submit .form-submit { width: 100%; }

	.contact-map iframe { height: 320px; }

	.footer-main { padding: 50px 20px 30px; background-position: 0 -200px; }
	.footer-columns { flex-direction: column; padding-right: 0; gap: 30px; }
	.footer-column { padding: 0; }
	.footer-bottom { flex-direction: column; gap: 0; padding: 20px; }
	.footer-bottom p { padding: 6px 0; }
	.footer-privacy { text-align: left; }
}

/* ==========================================================================
   "Life at TSM" collage on phones and small tablets (≤1023px):
   the two photos of the current topic as a pair at the top, the text below,
   and the arrows next to the dots instead of over the text.
   ========================================================================== */

@media (max-width: 1023px) {
	.lat-stage {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: start;
		height: auto;
		padding: 56px 24px 40px;
	}

	.lat .lat-p,
	.lat .lat-p[data-i] {
		display: none;
	}

	.lat .lat-p.hot,
	.lat .lat-p.hot[data-i] {
		display: block;
		position: relative;
		left: auto !important;
		top: auto !important;
		width: 100% !important;
		max-width: 250px;
		height: auto !important;
		aspect-ratio: 5 / 6;
		padding: 8px 8px 28px;
		justify-self: end;
		margin-right: -14px;
		transform: rotate(var(--r));
	}

	/* The second photo of the pair: a little lower, overlapping the first */
	.lat .lat-p.hot ~ .lat-p.hot {
		justify-self: start;
		margin: 28px 0 0 -14px;
	}

	.lat-center {
		position: relative;
		left: auto;
		top: auto;
		grid-column: 1 / -1;
		width: 100%;
		max-width: 520px;
		margin: 36px auto 0;
		transform: none;
	}

	.lat-clip { margin: 10px 0 14px; }
	.lat-title { font-size: 30px; }
	.lat-items { font-size: 16px; line-height: 24px; }
	.lat-dots { margin-top: 28px; }

	/* Arrows on the same line as the dots */
	.lat .lat-prev,
	.lat .lat-next {
		top: auto;
		bottom: 28px;
		width: 48px;
		height: 48px;
		transform: none;
	}

	.lat .lat-prev { left: 24px; }
	.lat .lat-next { right: 24px; }
}

@media (max-width: 400px) {
	.lat-stage { padding: 44px 16px 36px; }
	.lat-title { font-size: 26px; }
	.lat .lat-prev { left: 16px; }
	.lat .lat-next { right: 16px; }
}
