/* =============================================================================
 * SITE — Thiên Thanh Farm shared design system
 * Direction: "Nông nghiệp hiện đại, chân thực và có bằng chứng" (HOMEPAGE_DESIGN_AUDIT.md)
 *
 * Loaded by every page. Page styles live in home.css (homepage) and blog.css (articles).
 * Order: 1 Tokens · 2 Foundation · 3 Layout · 4 Shared components · 5 Utilities
 * Breakpoints (mobile-first): 576px · 768px · 992px (+1360px for the desktop back-to-top)
 * ============================================================================= */

/* -----------------------------------------------------------------------------
 * 1. TOKENS
 * -------------------------------------------------------------------------- */
:root {
  /* Colour — green is the trust base, gold is only an accent */
  --brand-900: #1b3d1c;
  --brand-800: #1f4a32;
  --brand-600: #4f7557;
  --brand-100: #e3ece2;
  --accent-500: #d4a843;
  --accent-700: #8a6216;
  --accent-100: #f8eed5;
  --ink: #27352d;
  --muted: #59675d;
  --canvas: #f6f2e9;
  --surface: #ffffff;
  --surface-alt: #eef3ec;
  --border: #d7ded6;
  --border-strong: #b9c6b8;
  --danger: #a33d2b;
  --warning-bg: #fff6e3;
  --warning-border: #e2b863;
  --success: #2f6a3b;
  --success-bg: #e7f2e8;
  --error-bg: #fbeae6;

  /* Typography */
  --font: "Be Vietnam Pro", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-meta: 0.875rem; /* 14px — dates, labels only */
  --fs-body: 1rem; /* 16px, 17px from 992px */
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --fs-h4: 1.125rem;
  --fs-h3: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(2rem, 1.45rem + 2vw, 3rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3.4vw, 4rem);
  --lh-body: 1.65;
  --lh-heading: 1.18;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --section-y: 56px;

  /* Shape & elevation */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 24px rgba(31, 74, 50, 0.08);
  --shadow-float: 0 16px 40px rgba(31, 74, 50, 0.14);

  /* Motion */
  --dur-fast: 180ms;
  --dur: 220ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Layout */
  --container: 1200px;
  --gutter: 16px;
  --header-h: 64px;
  --bar-h: 66px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --focus-ring: var(--brand-800);
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --section-y: 72px;
  }
}

@media (min-width: 992px) {
  :root {
    --fs-body: 1.0625rem;
    --header-h: 72px;
    --section-y: 88px;
  }
}

/* -----------------------------------------------------------------------------
 * 2. FOUNDATION
 * -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchors land below the sticky header */
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

img,
video {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  color: var(--brand-900);
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

a {
  color: var(--brand-800);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-900);
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-100);
  color: var(--brand-900);
}

main:focus {
  outline: none;
}

[hidden] {
  display: none !important; /* the one global guard: never let component display override [hidden] */
}

/* -----------------------------------------------------------------------------
 * 3. LAYOUT
 * -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--white {
  background: var(--surface);
}

.section--tint {
  background: var(--surface-alt);
}

.section-head {
  max-width: 760px;
  margin: 0 auto var(--space-8);
  text-align: center;
}

.section-head--left {
  margin-inline: 0;
  text-align: left;
}

.section-title {
  font-size: var(--fs-h2);
}

.section-lead {
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--muted);
}

.section-lead strong {
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-700);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent-500);
}

.eyebrow--pill {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--brand-800);
  letter-spacing: 0;
}

.eyebrow--pill::before {
  display: none;
}

.eyebrow--pill i {
  color: var(--accent-700);
}

.section-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  text-align: center;
}

.section-cta p {
  color: var(--muted);
}

@media (min-width: 768px) {
  .section-head {
    margin-bottom: var(--space-12);
  }

  .section-cta {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-4);
  }
}

/* -----------------------------------------------------------------------------
 * 4. SHARED COMPONENTS
 * -------------------------------------------------------------------------- */

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.btn--primary {
  background: var(--brand-800);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brand-900);
  color: #fff;
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--brand-800);
  color: var(--brand-800);
}

.btn--secondary:hover {
  background: var(--surface-alt);
  color: var(--brand-900);
}

.btn--lg {
  min-height: 56px;
  padding: 12px 26px;
  font-size: 1.0625rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.75;
}

.text-link {
  font-weight: 600;
  color: var(--brand-800);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* --- Skip link ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 200;
  padding: var(--space-3) var(--space-4);
  background: var(--brand-900);
  color: #fff;
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
  color: #fff;
}

/* --- Top bar (desktop only) ----------------------------------------------- */
.topbar {
  display: none;
}

@media (min-width: 992px) {
  .topbar {
    display: block;
    background: var(--brand-900);
    color: rgba(255, 255, 255, 0.88);
    font-size: var(--fs-meta);
  }

  /* Seamless right → left loop: two identical groups, each at least as wide
     as the bar, move together by one group width. */
  .topbar__marquee {
    --marquee-gap: var(--space-16);
    display: flex;
    gap: var(--marquee-gap);
    overflow: hidden;
  }

  .topbar__group {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: var(--marquee-gap);
    min-width: 100%;
    min-height: 34px;
    animation: topbar-scroll 40s linear infinite;
  }

  /* pause while reading or reaching for a phone number */
  .topbar__marquee:hover .topbar__group,
  .topbar__marquee:focus-within .topbar__group {
    animation-play-state: paused;
  }

  .topbar__item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
  }

  .topbar__item i {
    color: var(--accent-500);
  }

  .topbar__phone {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
  }

  .topbar__phone:hover {
    color: var(--accent-500);
  }

  .topbar :focus-visible {
    --focus-ring: var(--accent-500);
    outline-offset: -3px;
  }
}

@keyframes topbar-scroll {
  to {
    transform: translateX(calc(-100% - var(--marquee-gap)));
  }
}

/* Reduced motion: a still, centred bar */
@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
  .topbar__group {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-8);
    padding-inline: var(--gutter);
    animation: none;
  }

  .topbar__group[aria-hidden="true"] {
    display: none;
  }
}

/* --- Header & navigation -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  box-shadow: 0 6px 20px rgba(31, 74, 50, 0.08);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  color: var(--brand-900);
  text-decoration: none;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 1.125rem;
  font-weight: 700;
}

.brand__sub {
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--muted);
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  margin-right: -6px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--brand-900);
}

.menu-toggle:hover {
  background: var(--surface-alt);
}

.menu-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform var(--dur) var(--ease),
    opacity var(--dur-fast) var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile panel: solid white, dark text, 48px rows */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: var(--space-2) var(--gutter) var(--space-6);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    visibility 0s linear var(--dur);
}

.site-header.is-menu-open .site-nav {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav__link i {
  width: 22px;
  color: var(--brand-800);
  text-align: center;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--brand-800);
  background: var(--surface-alt);
}

.site-nav__link.is-active {
  box-shadow: inset 3px 0 0 var(--accent-500);
  font-weight: 600;
}

.site-nav__cta {
  width: 100%;
  margin-top: var(--space-4);
}

/* Without JavaScript the menu cannot open, so render it as a plain list */
.no-js .menu-toggle {
  display: none;
}

.no-js .site-header__inner {
  flex-wrap: wrap;
}

.no-js .site-nav {
  position: static;
  flex-basis: 100%;
  max-height: none;
  padding: 0 0 var(--space-4);
  box-shadow: none;
  border: 0;
  visibility: visible;
  opacity: 1;
  transform: none;
}

@media (min-width: 992px) {
  .brand__logo {
    width: 44px;
    height: 44px;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav,
  .no-js .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: var(--space-6);
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
    flex-basis: auto;
  }

  .no-js .site-header__inner {
    flex-wrap: nowrap;
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-1);
  }

  .site-nav__link {
    position: relative;
    min-height: 44px;
    padding: var(--space-2) var(--space-3);
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .site-nav__link i {
    display: none;
  }

  .site-nav__link:hover {
    background: var(--surface-alt);
  }

  .site-nav__link.is-active {
    background: none;
    box-shadow: inset 0 -2px 0 var(--accent-500);
    border-radius: 0;
  }

  .site-nav__cta {
    width: auto;
    margin: 0;
    min-height: 44px;
    padding-inline: 18px;
  }
}

/* --- Disclosure (details/summary) shared pattern -------------------------- */
/* FAQ, product extras, policy, footer groups (homepage) and the article TOC */
summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.disclosure__summary,
.policy__summary,
.faq__q,
.footer__title,
.toc__title {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding-right: 36px;
}

.disclosure__summary::after,
.policy__summary::after,
.faq__q::after,
.footer__title::after,
.toc__title::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}

details[open] > .disclosure__summary::after,
details[open] > .policy__summary::after,
details[open] > .faq__q::after,
details[open] > .footer__title::after,
details[open] > .toc__title::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

details[open] > :not(summary) {
  animation: reveal-down var(--dur) var(--ease);
}

@keyframes reveal-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* --- Tag ---------------------------------------------------------------- */
.tag {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-100);
  color: var(--brand-800);
  font-size: var(--fs-meta);
  font-weight: 600;
  line-height: 1.5;
  vertical-align: 1px;
}

/* --- Post cards (homepage knowledge + related articles) ------------------- */
.post-grid {
  display: grid;
  gap: var(--space-4);
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.post-card__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 35%;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-meta);
  color: var(--muted);
}

.post-card__title {
  font-size: var(--fs-h4);
  line-height: 1.35;
}

.post-card__title a {
  color: var(--brand-900);
  text-decoration: none;
}

/* whole card is clickable through the title link */
.post-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-card__title a:focus-visible {
  outline: none;
}

.post-card:focus-within {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.post-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.post-card__more {
  margin-top: var(--space-1);
  font-weight: 600;
  color: var(--brand-800);
}

.post-card__more i {
  margin-left: 4px;
  font-size: 0.85em;
}

.more-posts {
  margin-top: var(--space-6);
}

.more-posts__title {
  font-size: var(--fs-h4);
  margin-bottom: var(--space-2);
}

.more-posts__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 52px;
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  text-decoration: none;
}

.more-posts__list a:hover span {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

@media (hover: hover) and (min-width: 992px) {
  .post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
  }
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  --focus-ring: var(--accent-500);
  padding-top: var(--space-12);
  background: var(--brand-900);
  color: rgba(255, 255, 255, 0.86);
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: var(--accent-500);
}

.footer__grid {
  display: grid;
  gap: var(--space-2);
}

.brand--light {
  color: #fff;
}

.brand--light .brand__sub {
  color: rgba(255, 255, 255, 0.75);
}

.brand--light .brand__logo {
  padding: 3px;
  background: #fff;
}

.footer__tagline {
  max-width: 36em;
  margin-top: var(--space-3);
}

.footer__contact {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.footer__contact li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.footer__contact i {
  margin-top: 6px;
  color: var(--accent-500);
}

.footer__contact li:has(a) i {
  margin-top: 0;
}

.footer__contact li:has(a) {
  align-items: center;
}

.footer__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer__social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  margin-bottom: var(--space-6);
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  text-decoration: none;
}

.footer__social a:hover {
  border-color: var(--accent-500);
}

.footer__group {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer__title {
  min-height: 52px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
}

.footer__links {
  padding-bottom: var(--space-3);
}

.footer__links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding-block: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--fs-meta);
}

.footer__credit a {
  color: var(--accent-500);
  text-decoration: none;
}

.footer__top {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  text-decoration: none;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-10);
  }

  .footer__group {
    border-top: 0;
  }

  .footer__title {
    min-height: 0;
    margin-bottom: var(--space-3);
    padding-right: 0;
    cursor: default;
    pointer-events: none;
  }

  .footer__title::after {
    display: none;
  }

  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* --- Mobile action bar ---------------------------------------------------- */
.action-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(31, 74, 50, 0.1);
  transition:
    transform var(--dur) var(--ease),
    visibility 0s linear 0s;
}

.action-bar.is-hidden {
  visibility: hidden;
  transform: translateY(110%);
  transition:
    transform var(--dur) var(--ease),
    visibility 0s linear var(--dur);
}

.action-bar__btn,
.action-bar__top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
}

.action-bar__btn--call {
  background: var(--brand-800);
  color: #fff;
}

.action-bar__btn--call:hover {
  background: var(--brand-900);
  color: #fff;
}

.action-bar__btn--zalo {
  border: 2px solid var(--brand-800);
  color: var(--brand-800);
}

.action-bar__top {
  padding: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--brand-800);
}

/* reserve the bar's space so it never covers the footer or a focused field */
body {
  padding-bottom: calc(var(--bar-h) + var(--safe-bottom));
}

html {
  scroll-padding-bottom: calc(var(--bar-h) + var(--space-4));
}

@media (min-width: 992px) {
  .action-bar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  html {
    scroll-padding-bottom: 0;
  }
}

/* Desktop back-to-top: only from 1360px, where the gutter outside the 1200px
   content column is wide enough for the button to never cover content */
.to-top {
  display: none;
}

@media (min-width: 1360px) {
  .to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--brand-800);
    box-shadow: var(--shadow-card);
    transition:
      opacity var(--dur) var(--ease),
      transform var(--dur) var(--ease),
      visibility 0s;
  }

  .to-top.is-hidden {
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity var(--dur) var(--ease),
      transform var(--dur) var(--ease),
      visibility 0s linear var(--dur);
  }

  .to-top:hover {
    background: var(--brand-800);
    color: #fff;
  }
}

/* -----------------------------------------------------------------------------
 * 5. UTILITIES & PREFERENCES
 * -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
}

@media print {
  .topbar,
  .site-header,
  .action-bar,
  .to-top,
  .contact__map,
  .carousel__controls {
    display: none;
  }

  body {
    padding: 0;
    background: #fff;
  }
}
