/* Landing page (front-page.php). Chỉ được nạp ở trang chủ; token màu, font và
   các thành phần dùng chung (nút, header, thẻ bài) nằm trong style.css. */

/* Hero */

.hero__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 56px;
	padding-block: 88px;
}

/* Điện thoại: 88px phía trên đẩy tiêu đề xuống quá sâu trong màn hình đầu.
   Các section khác (.section, .contact__inner, .band__inner) cũng 56px. */
@media (max-width: 480px) {
	.hero__inner {
		padding-top: 56px;
	}
}

.hero__content {
	flex: 1 1 480px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.hero__badge {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	font-size: 14px;
	font-weight: 600;
}

/* Tia sét "thở" để kéo mắt người xem tới dòng đang nhận dự án. */
.hero__bolt {
	color: var(--c-sun);
	transform-origin: center;
	animation: c2s-bolt-breathe 2.2s ease-in-out infinite;
}

@keyframes c2s-bolt-breathe {
	0%, 100% {
		transform: scale(1);
		filter: drop-shadow(0 0 0 rgba(255, 216, 77, 0));
	}
	50% {
		transform: scale(1.2);
		filter: drop-shadow(0 0 6px rgba(255, 216, 77, .95));
	}
}

.hero__title {
	font-size: clamp(42px, 5.4vw, 76px);
	line-height: .98;
	letter-spacing: -0.035em;
}

.hero__title em {
	font-style: normal;
	color: var(--c-sun);
}

/* Hiệu ứng gõ chữ (landing.js). Ký tự chưa gõ bị ẩn bằng visibility chứ
   không display:none, để dòng giữ nguyên bề rộng và không đẩy bố cục. */
.typewriter__char.is-pending {
	visibility: hidden;
}

/* Con trỏ rộng 0.08em nhưng margin âm cùng cỡ, nên chiếm 0px trong dòng: di
   chuyển nó qua từng ký tự không làm chữ nhích. */
.typewriter__caret {
	display: inline-block;
	width: .08em;
	height: .82em;
	margin-right: -.08em;
	vertical-align: -.04em;
	background: var(--c-sun);
	animation: c2s-caret-blink 1s steps(1) infinite;
}

.typewriter__caret.is-done {
	animation: none;
	opacity: 0;
	transition: opacity .4s ease;
}

@keyframes c2s-caret-blink {
	50% {
		opacity: 0;
	}
}

.hero__lead {
	max-width: 520px;
	font-size: 18px;
	line-height: 1.65;
	color: var(--c-brand-soft);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Điện thoại: ở 16px hai nút cần 408px, mà iPhone 15 (393px) chỉ còn 345px
   và Samsung A56 (381px) còn 333px, nên nút thứ hai rớt xuống hàng. Chữ 14px,
   icon 16px: bản VI cần 312px, bản EN ("See all apps", không kèm số) 319px
   (đo bằng WebKit với font của theme, 2026-10-25). Máy 360px còn 312px nên
   bản VI vừa khít, bản EN vẫn xuống hàng. */
@media (max-width: 480px) {
	.hero__actions {
		gap: 8px;
	}

	.hero__actions .button {
		gap: 6px;
		padding-inline: 14px;
		font-size: 14px;
	}

	.hero__actions .button svg {
		width: 16px;
		height: 16px;
	}
}

.hero__apps {
	flex: 1 1 340px;
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	padding: 24px;
	border-radius: 24px;
	background: rgba(255, 255, 255, .14);
}

.hero__app-icon {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border-radius: 22%;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

/* Khung chung của các section */

.section {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding-block: 64px 24px;
}

/* Điện thoại: bấm menu thì trang dừng ở mép trên section, nên khoảng này là
   khoảng từ header tới tiêu đề; giữ 56px như hero. */
@media (max-width: 480px) {
	.section {
		padding-top: 56px;
	}
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}

.section__head--stack {
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.section__head-text {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.section__head-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.section__title {
	font-size: clamp(34px, 4vw, 56px);
}

.section__title--small {
	font-size: clamp(30px, 3.4vw, 44px);
}

.section__subtitle {
	font-size: 19px;
	line-height: 1.5;
	color: var(--c-ink-soft);
}

.bento {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

/* Sản phẩm */

.app-card {
	flex: 1 1 260px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 28px;
	border-radius: var(--radius-md);
	background: var(--c-surface);
	transition: transform .4s var(--ease-spring), box-shadow .4s ease;
}

/* Chỉ thẻ là link mới nhấc lên khi rê chuột. Thẻ có nhiều store không bấm
   được cả thẻ, nên nhấc lên sẽ gợi ý sai; các nút trong đó tự có hiệu ứng. */
a.app-card:hover,
a.app-card:focus-visible {
	transform: translateY(-8px);
	box-shadow: 0 22px 44px rgba(22, 22, 22, .16);
}

.app-card__icon {
	width: 72px;
	height: 72px;
	border-radius: 20px;
	transition: transform .5s var(--ease-spring);
}

a.app-card:hover .app-card__icon,
a.app-card:focus-visible .app-card__icon {
	transform: scale(1.1) rotate(-6deg);
}

.app-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.app-card__body {
	flex: 1 1 240px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.app-card__name {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.app-card__description {
	font-size: 14px;
	line-height: 1.55;
	color: var(--c-ink-soft);
}

.app-card--featured {
	flex: 2 1 520px;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px;
	padding: 40px;
	border-radius: var(--radius-lg);
	background: var(--c-lilac);
}

/* Điện thoại: padding 28px như thẻ nhỏ. Với 40px, ở Samsung A56 (381px)
   phần chữ chỉ rộng 253px, không đủ cho hai nút store (261px) nên nút App
   Store rớt xuống hàng. Đo 2026-10-31. */
@media (max-width: 480px) {
	.app-card--featured {
		padding: 28px;
	}
}

.app-card--featured .app-card__icon {
	width: 160px;
	height: 160px;
	border-radius: 40px;
	box-shadow: 0 16px 40px rgba(22, 22, 22, .18);
}

.app-card--featured .app-card__name {
	font-family: var(--font-display);
	font-size: 34px;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.app-card--featured .app-card__description {
	font-size: 16px;
	line-height: 1.6;
	color: var(--c-ink);
}

.app-card__cta {
	font-size: 15px;
	font-weight: 700;
}

.app-card__platform {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 6px;
	margin-top: auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--c-ink-soft);
}

.app-card__platforms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-top: auto;
}

a.app-card__platform:hover,
a.app-card__platform:focus-visible {
	color: var(--c-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.app-card__stores {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Nút nhỏ ở mọi bề ngang, để hai nút Google Play và App Store nằm cùng một
   hàng: ở 1280px phần chữ của thẻ lớn chỉ rộng ~318px. Với chữ 14px và
   padding 12px, hai nút cộng khoảng cách cần 261px (đo bằng Chrome với font
   của theme, 2026-10-31). Trên điện thoại phần chữ rộng 271px ở 375px, 277px
   ở Samsung A56 (381px); máy 360px còn 256px nên nút thứ hai vẫn xuống hàng. */
.app-card__stores .button {
	gap: 6px;
	padding-inline: 12px;
	font-size: 14px;
}

.app-card__stores .button svg {
	width: 16px;
	height: 16px;
}

/* Dịch vụ */

.service {
	flex: 1 1 320px;
	min-width: 0;
	min-height: 300px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	/* 32px chứ không 36px như các ô khác: ở bề ngang 3 cột, hai tag
	   "Android / iOS" và "Windows / macOS / Linux" cộng lại rộng đúng bằng ô
	   khi padding 36px và bị đẩy xuống hai dòng (đo được 315/315px). */
	padding: 32px;
	border-radius: var(--radius-lg);
}

.service--web {
	background: var(--c-coral);
}

.service--app {
	background: var(--c-sun);
}

.service--server {
	background: var(--c-teal);
	color: #FFFFFF;
}

.service--server .service__description {
	color: #E3F5EF;
}

/* Tiêu đề bám đỉnh, nhãn bám đáy: mô tả dài ngắn khác nhau (2 hay 3 dòng tùy
   bề ngang) cũng không làm tiêu đề hay nhãn của ba ô lệch hàng. */
.service__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.service__title {
	font-size: 30px;
	letter-spacing: -0.02em;
}

.service__description {
	font-size: 16px;
	line-height: 1.6;
}

.service__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: auto 0 0;
	padding: 4px 0 0;
	list-style: none;
}

/* Điện thoại: với padding 32px, tag 13px và padding tag 12px, hai tag của ô
   App cần 315px và của ô Server 303px, nhưng trong ô chỉ còn 281px ở iPhone 15
   và 269px ở Samsung A56 nên tag thứ hai bị đẩy xuống hàng. Padding ô 24px,
   tag 11px, padding tag 9px và khoảng cách 6px: ô App còn cần khoảng 261px,
   vừa cả ở 360px (còn 264px). */
@media (max-width: 480px) {
	.service {
		padding: 24px;
	}

	.service__tags {
		gap: 6px;
	}

	.service__tags .chip {
		padding-inline: 9px;
		font-size: 11px;
	}
}

/* Khách hàng nói gì */

.rating-tile {
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 20px;
	padding: 36px;
	border-radius: var(--radius-lg);
	background: var(--c-sun);
}

.rating-tile__stars {
	display: flex;
	gap: 4px;
}

.rating-tile__score {
	font-family: var(--font-display);
	font-size: 88px;
	font-weight: 800;
	line-height: .9;
	letter-spacing: -0.04em;
}

.rating-tile__count {
	margin-top: 6px;
	font-weight: 600;
}

.stats-tile {
	flex: 2 1 560px;
	min-width: 0;
	display: grid;
	/* 120px để điện thoại vẫn chia được 2 cột thay vì xếp 4 số thành một cột dài. */
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	align-content: center;
	gap: 28px 24px;
	margin: 0;
	padding: clamp(24px, 4vw, 36px);
	border-radius: var(--radius-lg);
	background: var(--c-surface);
}

/* Số đứng trên nhãn khi nhìn, nhưng nhãn (dt) vẫn đi trước số (dd) trong
   markup để trình đọc màn hình đọc "Đúng hạn: 100%". */
.stats-tile__item {
	display: flex;
	flex-direction: column-reverse;
	gap: 6px;
}

.stats-tile__label {
	font-size: 15px;
	font-weight: 600;
	color: var(--c-ink-soft);
}

.stats-tile__value {
	margin: 0;
	font-family: var(--font-display);
	font-size: 48px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--c-brand);
}

/* Ba thẻ một hàng trên desktop. Đánh giá dài nhất đứng cuối danh sách
   (c2s_freelancer_reviews()) nên một mình một hàng và giãn hết bề ngang,
   thay vì kéo cao thẻ đứng cạnh nó. */
.review {
	flex: 1 1 340px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	padding: 32px;
	border-radius: var(--radius-md);
	background: var(--c-surface);
}

.review__mark {
	color: #C9B8FF;
}

.review__quote {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.5;
}

.review__caption {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	font-size: 14px;
	color: var(--c-ink-soft);
}

.review__caption strong {
	color: var(--c-ink);
}

/* Liên hệ */

.contact {
	margin-top: 64px;
	background: var(--c-brand);
	color: #FFFFFF;
}

/* Lời mời và form canh mép trên như artboard C; canh giữa thì tiêu đề trôi
   xuống giữa form khi form có thêm thông báo lỗi hay Turnstile. */
.contact__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 56px;
	padding-block: 96px;
}

@media (max-width: 480px) {
	.contact__inner {
		padding-top: 56px;
	}
}

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

.contact__title {
	font-size: clamp(38px, 4.6vw, 64px);
	letter-spacing: -0.035em;
}

.contact__underline {
	padding-bottom: 4px;
	background-image: linear-gradient(var(--c-sun), var(--c-sun));
	background-repeat: no-repeat;
	background-position: 0 95%;
	background-size: 100% 6px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.contact__lead {
	font-size: 17px;
	line-height: 1.65;
	color: var(--c-brand-soft);
}

.contact__card {
	flex: 1 1 420px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 32px;
	border-radius: var(--radius-md);
	background: var(--c-surface);
	color: var(--c-ink);
}

.contact__card-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--c-ink-soft);
}

.contact__email {
	font-family: var(--font-display);
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 800;
	letter-spacing: -0.02em;
	overflow-wrap: anywhere;
	transition: color .2s ease;
}

.contact__email:hover,
.contact__email:focus-visible {
	color: var(--c-brand);
}

.contact__direct {
	font-size: 16px;
	color: var(--c-brand-soft);
}

.contact__direct a {
	color: #FFFFFF;
	font-weight: 700;
	overflow-wrap: anywhere;
	transition: color .2s ease;
}

.contact__direct a:hover,
.contact__direct a:focus-visible {
	color: var(--c-sun);
}

/* Form liên hệ */

/* Khoảng cách và padding gọn hơn thẻ email (16px/32px) để form không cao
   gấp đôi cột lời mời bên cạnh: trước khi chỉnh, trên desktop form cao 615px
   còn cột lời mời 255px. */
.contact-form {
	position: relative;
	align-items: stretch;
	gap: 14px;
	padding: 28px;
}

.form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.form-row > .field {
	flex: 1 1 200px;
}

.field {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
}

.field__label {
	padding: 0;
	font-size: 14px;
	font-weight: 600;
}

legend.field__label {
	margin-bottom: 10px;
}

.field__input {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #8A8A84;
	border-radius: 16px;
	background: #FFFFFF;
	font-size: 16px;
	transition: border-color .2s ease;
}

.field__input:hover {
	border-color: var(--c-ink);
}

textarea.field__input {
	resize: vertical;
	min-height: 112px;
}

.field__input[aria-invalid="true"],
[aria-invalid="true"] .choice {
	border-color: #B42318;
}

.field__error {
	font-size: 14px;
	font-weight: 600;
	color: #B42318;
}

/* Khoảng cách và padding (8px, 12px) được tính để bốn lựa chọn nằm vừa một
   hàng trong thẻ form ở desktop: với 10px và 16px chúng rộng 561px trong ô
   544px, và "Khác" bị đẩy xuống hàng (đo trên prod 2026-10-24). */
.choice-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.choice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #8A8A84;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}

.choice input {
	margin: 0;
	accent-color: var(--c-ink);
}

.choice:hover {
	border-color: var(--c-ink);
}

.choice:active {
	transform: scale(.96);
}

.choice:has(input:checked) {
	border-color: var(--c-ink);
	background: var(--c-accent);
	color: #FFFFFF;
}

.choice:has(input:focus-visible) {
	outline: 3px solid var(--c-brand);
	outline-offset: 2px;
}

.form-notice {
	padding: 14px 18px;
	border-radius: 16px;
	font-weight: 600;
}

.form-notice--success {
	background: #E3F5EF;
	color: #0B5A4A;
}

.form-notice--error {
	background: #FDECEA;
	color: #8A1C12;
}

.contact-form__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}

/* Widget Turnstile (chế độ flexible) cần tối thiểu 300px; nó giãn lấp phần
   còn lại của hàng, và khi không đủ chỗ cho cả nút gửi thì nút xuống hàng. */
.contact-form__footer .cf-turnstile {
	flex: 1 1 300px;
	min-width: 0;
}

.contact-form__note {
	font-size: 13px;
	color: var(--c-ink-soft);
}

/* Điện thoại: widget Turnstile không co dưới 300px, mà ở 360px phần trong của
   thẻ form chỉ còn 256px nên widget lòi ra ngoài mép thẻ. Thẻ form mở rộng gần
   sát mép màn hình (chừa 8px) và padding 20px: ở 360px còn 304px. */
@media (max-width: 480px) {
	.contact-form {
		margin-inline: calc(8px - var(--gutter));
		padding: 24px 20px;
	}
}

.contact-form__arrow {
	display: inline-block;
	transition: transform .3s var(--ease-spring);
}

.contact-form__submit:hover .contact-form__arrow,
.contact-form__submit:focus-visible .contact-form__arrow {
	transform: translateX(5px);
}

/* Hiệu ứng trượt lên khi cuộn tới khối liên hệ. landing.js chỉ thêm
   .is-reveal-waiting khi khối đang nằm dưới màn hình, nên script không chạy
   thì khối vẫn hiện bình thường. */
.reveal {
	transition: opacity .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
}

.is-reveal-waiting .reveal {
	opacity: 0;
	transform: translateY(32px);
}

.is-revealed .reveal--late {
	transition-delay: .12s;
}

.is-reveal-waiting .contact__underline {
	background-size: 0% 6px;
}

.is-revealed .contact__underline {
	transition: background-size .9s cubic-bezier(.2, .8, .2, 1) .45s;
}

@media (prefers-reduced-motion: reduce) {
	.hero__bolt {
		animation: none;
	}

	a.app-card:hover,
	a.app-card:focus-visible,
	a.app-card:hover .app-card__icon,
	a.app-card:focus-visible .app-card__icon {
		transform: none;
	}

	.is-reveal-waiting .reveal {
		opacity: 1;
		transform: none;
	}

	.is-reveal-waiting .contact__underline {
		background-size: 100% 6px;
	}
}
