/* ==========================================================================
   Base — typography & element defaults layered over Flatsome.
   Only var(--my-*) values here. No hex codes.
   ========================================================================== */

body {
	font-family: var(--my-font-body);
	font-size: var(--my-fs-body);
	line-height: var(--my-lh-body);
	color: var(--my-color-text);
	background: var(--my-color-bg);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.heading-font, .nav > li > a {
	font-family: var(--my-font-heading);
	color: var(--my-color-primary);
	line-height: var(--my-lh-tight);
	letter-spacing: -0.01em;
}

h1 { font-size: var(--my-fs-h1); font-weight: var(--my-fw-bold); }
h2 { font-size: var(--my-fs-h2); font-weight: var(--my-fw-bold); }
h3 { font-size: var(--my-fs-h3); font-weight: var(--my-fw-semi); }

a { color: var(--my-color-primary); transition: color var(--my-dur) var(--my-ease); }
a:hover { color: var(--my-color-accent-dark); }

:focus-visible {
	outline: 2px solid var(--my-color-accent);
	outline-offset: 2px;
}

img { height: auto; }

/* Long-form content (project description, blog posts). */
.my-prose { max-width: 72ch; }
.my-prose > * + * { margin-top: var(--my-space-4); }
.my-prose h2 { margin-top: var(--my-space-7); }
.my-prose h3 { margin-top: var(--my-space-6); }
.my-prose ul, .my-prose ol { padding-left: var(--my-space-5); }
.my-prose img { border-radius: var(--my-radius-md); }
.my-prose table { width: 100%; border-collapse: collapse; font-size: var(--my-fs-small); }
.my-prose th, .my-prose td { padding: var(--my-space-3); border-bottom: 1px solid var(--my-color-border); text-align: left; }

/* Leave room for the mobile floating bar so it never covers the footer. */
@media (max-width: 549px) {
	body { padding-bottom: calc(var(--my-float-bar-h) + var(--my-space-4)); }
}

@media (prefers-reduced-motion: reduce) {
	* { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ==========================================================================
   Legacy font override — Flatsome Typography + old Custom CSS (Theme Options)
   still print legacy fonts. Beat them (html body = 0,0,2) with tokens.
   Remove this block once those wp-admin settings are cleaned (see docs/spawn/thong-nhat-font-2-phong.md).
   ========================================================================== */
html body,
html body .header-button,
html body .post h2,
html body .post h3,
html body .post h4,
html body blockquote p,
html body .nav > li > a,
html body .mobile-sidebar-levels-2 .nav > li > ul > li > a,
html body .off-canvas-center .nav-sidebar.nav-vertical > li > a,
html body .mh-info-value,
html body .mo-item span,
html body .buton-phan-khu,
html body div.wpforms-container-full .wpforms-form button[type=submit] {
	font-family: var(--my-font-body);
}

html body .heading-font,
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body blockquote:before {
	font-family: var(--my-font-heading);
}
