/* ==========================================================================
   Target Media — base styles
   Màu lấy từ Figma: brand đỏ #CF2429, text đen #111111
   ========================================================================== */

:root {
	--tm-color-brand: #CF2429;
	--tm-color-text: #111111;
	--tm-container-width: 1440px;
	--tm-container-padding: 40px;
}

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

html {
	scroll-behavior: smooth;
	/* KHÔNG dùng scrollbar-gutter:stable — nó chừa sẵn 1 dải trống bên
	   phải MỌI LÚC (kể cả khi không mở popup), nhìn thừa/xấu. Thay vào đó
	   việc chống "nhảy" trang lúc mở popup chỉ xử lý bằng JS đúng lúc cần
	   (bù padding-right = đúng bề rộng thanh cuộn, CHỈ trong lúc popup mở
	   rồi trả lại ngay khi đóng) — xem main.js, tìm "tmLockScroll". Thanh
	   cuộn thật của trình duyệt không bị đụng vào lúc bình thường. */
}

/* Bọc TOÀN BỘ nội dung trang (trừ vector nền chính ở Hero) trong 1 khối
   luôn nổi lên trên — cách chắc chắn nhất để đảm bảo vector nền không
   bao giờ đè lên bất kỳ chữ/ảnh nào, thay vì phải chỉnh z-index riêng
   lẻ cho từng section (dễ sót, đã từng bị sót phần marquee logo). */
#tm-page {
	position: relative;
	z-index: 1;
}

/* Chừa khoảng trống phía trên khi nhảy tới anchor, tránh bị header (sticky) che mất */
section[id] {
	scroll-margin-top: 90px;
}

body {
	margin: 0;
	color: var(--tm-color-text);
	font-family: 'UTM Avo', Arial, sans-serif;
	font-weight: 400;
}

img {
	max-width: 100%;
	display: block;
}

.tm-container {
	max-width: var(--tm-container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--tm-container-padding);
	padding-right: var(--tm-container-padding);
}

/* Dùng cho các section muốn "tràn màn hình" thật sự (không giới hạn
   1440px như .tm-container) — ví dụ Our Work, Highlights — chỉ chừa 1
   khoảng lề nhỏ cố định 2 bên, giống cách dải logo marquee đã tràn. */
.tm-container--full {
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 40px;
	padding-right: 40px;
	box-sizing: border-box;
}

/* ---- Header (tạm, sẽ tinh chỉnh khi có section hero từ Figma) ---- */
.tm-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 24px;
	padding-bottom: 24px;
}

.tm-menu {
	display: flex;
	flex-direction: column;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tm-menu a {
	display: block;
	text-align: center;
	color: #fff;
	text-decoration: none;
	font-family: 'UTM Avo', Arial, sans-serif;
	font-weight: 700;
	font-size: 18px;
	padding: 9px 16px;
	border-radius: 999px;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.tm-menu a:hover {
	background-color: #fff;
	color: var(--tm-color-brand);
}

/* ==========================================================================
   Section: Years / Timeline (Figma node 125:12013)
   ========================================================================== */

/* ---- Scrollytelling: cuộn xuống -> ghim lại -> trượt ngang qua từng năm,
   cuộn hết 3 năm mới thả ra cho trang tiếp tục cuộn dọc bình thường.
   Điều khiển bằng JS (xem main.js, tìm "tm-years-scrolly"). ---- */
.tm-years-scrolly {
	position: relative;
	z-index: 1;
	height: 432vh; /* 3 năm + khoảng chờ cuối ở năm 2026 (đã tăng thêm 20% lần 2, tổng ~44% so với bản gốc) */
}
.tm-years-scrolly__pin {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow: hidden;
}
/* Vector trang trí bay vào từ bên phải khi bắt đầu cuộn vào section này
   (không lặp lại theo từng năm — chỉ 1 lần lúc mới vào). Điều khiển bằng
   JS trong main.js (dùng chung tiến trình cuộn của years-scrolly). */
.tm-years-scrolly__decor {
	position: absolute;
	top: 4%;
	right: -8%;
	width: 46%;
	max-width: 620px;
	pointer-events: none;
	z-index: 0;
	will-change: transform;
}
.tm-years-scrolly__title {
	position: absolute;
	left: 9%;
	top: 30%;
	transform: translateY(-50%);
	margin: 0;
	text-align: left;
	font-family: 'UTM Avo', Arial, sans-serif;
	font-weight: 700;
	font-size: clamp(40px, 6vw, 96px);
	color: var(--tm-color-text);
	z-index: 2;
}
.tm-years-scrolly__track {
	position: absolute;
	inset: 0;
	display: flex;
	will-change: transform;
}
.tm-years-scrolly__panel {
	position: relative;
	width: 100vw;
	height: 100%;
	flex-shrink: 0;
}
/* Năm + đoạn mô tả xếp HÀNG NGANG, canh trái — đúng layout trong ảnh mẫu
   (không còn canh giữa/xếp dọc như bản trước) */
.tm-years-scrolly__row {
	position: absolute;
	left: 9%;
	top: 54%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	gap: 50px;
	max-width: 88%;
	z-index: 1;
}

.tm-years__number {
	margin: 0;
	font-family: 'UTM Avo', Arial, sans-serif;
	font-weight: 700;
	color: var(--tm-color-brand);
	font-size: clamp(70px, 10vw, 140px);
	line-height: 1;
	letter-spacing: -1.21px;
	white-space: nowrap;
}

.tm-years__text {
	margin: 0;
	font-family: 'UTM Avo', Arial, sans-serif;
	font-weight: 400;
	color: var(--tm-color-text);
	font-size: clamp(15px, 1.5vw, 19px);
	line-height: 1.4;
	text-align: left;
	max-width: 420px;
}

@media (max-width: 768px) {
	.tm-years-scrolly__title { top: 22%; font-size: clamp(32px, 8vw, 56px); }
	.tm-years-scrolly__row { flex-direction: column; align-items: flex-start; gap: 16px; top: 55%; }
	.tm-years-scrolly__decor { width: 70%; top: 2%; }
}

@media (max-width: 600px) {
	.tm-years-scrolly { height: 346vh; }
}

/* ---- Footer (tạm) ---- */
.tm-footer {
	padding: 40px 0;
	border-top: 1px solid #eee;
}

.tm-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
