.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.5, 0, 0, 1), transform 0.7s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

@keyframes contactDockEnter {
  from {
    opacity: 0;
    transform: translateX(1.25rem) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes contactDockPulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes testimonialStarPop {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-20deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes contactDockRipple {
  0% {
    transform: scale(0.92);
    opacity: 0.95;
    box-shadow:
      0 0 0 2px var(--dock-ring, rgba(74, 142, 255, 0.85)),
      0 0 14px var(--dock-glow, rgba(74, 142, 255, 0.55)),
      0 0 28px var(--dock-glow-soft, rgba(74, 142, 255, 0.25));
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
    box-shadow:
      0 0 0 1px transparent,
      0 0 6px transparent,
      0 0 12px transparent;
  }
}

@keyframes contactDockWiggle {
  0%, 55%, 100% {
    transform: rotate(0deg) scale(1);
  }
  58% {
    transform: rotate(-10deg) scale(1.04);
  }
  61% {
    transform: rotate(10deg) scale(1.04);
  }
  64% {
    transform: rotate(-8deg) scale(1.03);
  }
  67% {
    transform: rotate(8deg) scale(1.03);
  }
  70% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes contactDockOrbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes contactDockNeonPulse {
  0%, 100% {
    box-shadow:
      0 0 12px var(--dock-glow, rgba(74, 142, 255, 0.35)),
      0 4px 16px rgba(15, 23, 42, 0.18);
  }
  50% {
    box-shadow:
      0 0 22px var(--dock-glow, rgba(74, 142, 255, 0.65)),
      0 0 36px var(--dock-glow-soft, rgba(74, 142, 255, 0.3)),
      0 6px 20px rgba(15, 23, 42, 0.2);
  }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  animation: marquee 32s linear infinite;
  will-change: transform;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-band__row--clone {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-band,
  .marquee-band.overflow-hidden {
    overflow: visible;
  }

  .marquee-band__viewport,
  .marquee-band__viewport.overflow-hidden {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .marquee-track {
    animation: none;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .marquee-band__row {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding-inline: 0;
  }

  .marquee-band__row.marquee-band__row--clone {
    display: none !important;
  }
}

/* Marquee band */
.marquee-band {
  position: relative;
  padding-block: 3.25rem;
  border-block: 1px solid var(--color-outline-variant);
  background:
    linear-gradient(180deg, rgba(74, 142, 255, 0.07) 0%, transparent 40%, transparent 60%, rgba(255, 186, 56, 0.05) 100%),
    var(--color-surface);
  box-shadow:
    inset 0 1px 0 rgba(74, 142, 255, 0.08),
    inset 0 -1px 0 rgba(74, 142, 255, 0.05);
}

.marquee-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 120% at 50% 0%, rgba(74, 142, 255, 0.1), transparent 65%);
  pointer-events: none;
}

.marquee-band__inner {
  position: relative;
  z-index: 1;
}

.marquee-band__header {
  margin-bottom: 2.25rem;
}

.marquee-band__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 142, 255, 0.22);
  background: rgba(74, 142, 255, 0.08);
  color: var(--color-primary);
  letter-spacing: 0.12em;
}

.marquee-band__eyebrow::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--color-tertiary);
  box-shadow: 0 0 10px rgba(255, 186, 56, 0.65);
}

.marquee-band__title {
  margin: 0 0 1.25rem;
  color: var(--color-on-surface);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.marquee-band__count {
  display: inline-block;
  margin-inline: 0.2em;
  color: var(--color-primary);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.marquee-band__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marquee-band__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 142, 255, 0.14);
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-on-surface);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.marquee-band__stat .material-symbols-outlined {
  font-size: 1.05rem;
  color: var(--color-primary);
}

.marquee-band__row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
  padding-inline: 0.75rem;
}

.marquee-band__viewport {
  position: relative;
  /* Chỉ dùng mask — không overlay màu cứng (dễ lệch nền dark/tablet) */
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

/* Logo tiles */
.marquee-partner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 7.5rem;
  height: 4.25rem;
  padding: 0.85rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(74, 142, 255, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1),
    border-color 0.25s ease,
    box-shadow 0.28s ease,
    background 0.25s ease;
}

.marquee-partner:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 142, 255, 0.32);
  background: #fff;
  box-shadow:
    0 16px 36px rgba(74, 142, 255, 0.16),
    0 4px 12px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.marquee-partner__logo-img {
  display: block;
  width: auto;
  height: 2rem;
  max-width: 8.5rem;
  object-fit: contain;
  transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.marquee-partner__logo-img--wordmark {
  height: 2.15rem;
  max-width: 9.5rem;
}

.marquee-partner:hover .marquee-partner__logo-img {
  transform: scale(1.05);
}

.marquee-partner__initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  background: linear-gradient(135deg, rgba(74, 142, 255, 0.14), rgba(124, 77, 255, 0.12));
}

/* Dark mode */
html.dark .marquee-band {
  background:
    linear-gradient(180deg, rgba(6, 14, 32, 0.5) 0%, rgba(23, 31, 51, 0.82) 48%, rgba(6, 14, 32, 0.5) 100%);
  border-color: rgba(173, 199, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(173, 199, 255, 0.1),
    inset 0 -1px 0 rgba(173, 199, 255, 0.06),
    0 0 48px rgba(74, 142, 255, 0.08);
}

html.dark .marquee-band__title {
  color: var(--color-on-surface);
}

html.dark .marquee-band__stat {
  border-color: rgba(173, 199, 255, 0.14);
  background: rgba(19, 27, 46, 0.65);
  color: var(--color-on-surface);
}

html.dark .marquee-partner {
  border-color: rgba(173, 199, 255, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html.dark .marquee-partner:hover {
  border-color: rgba(74, 142, 255, 0.4);
  background: #fff;
  box-shadow:
    0 18px 40px rgba(74, 142, 255, 0.2),
    0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Tablet + mobile: lưới logo, không marquee — tránh overflow cắt hai đầu */
@media (max-width: 1024px) {
  .marquee-band {
    padding-block: 2.5rem;
  }

  .marquee-band,
  .marquee-band.overflow-hidden {
    overflow: visible;
  }

  .marquee-band__header {
    margin-bottom: 1.5rem;
    padding-inline: 0.25rem;
  }

  .marquee-band__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .marquee-band__title {
    font-size: clamp(1.15rem, 3vw, 1.55rem);
    line-height: 1.35;
    margin-bottom: 1rem;
  }

  .marquee-band__count {
    display: inline;
  }

  .marquee-band__stats {
    gap: 0.45rem 0.6rem;
    max-width: 36rem;
    margin-inline: auto;
  }

  .marquee-band__stat {
    font-size: 0.76rem;
    padding: 0.32rem 0.65rem;
  }

  .marquee-band__stat .material-symbols-outlined {
    font-size: 0.95rem;
  }

  .marquee-band__viewport,
  .marquee-band__viewport.overflow-hidden {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .marquee-track {
    animation: none;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    will-change: auto;
  }

  .marquee-band__row {
    display: contents;
  }

  .marquee-band__row.marquee-band__row--clone {
    display: none !important;
  }

  .marquee-partner {
    min-width: 6rem;
    height: 3.5rem;
    padding: 0.6rem 0.95rem;
    border-radius: 0.85rem;
  }

  .marquee-partner__logo-img {
    height: 1.65rem;
    max-width: 7rem;
  }

  .marquee-partner__logo-img--wordmark {
    height: 1.75rem;
    max-width: 7.5rem;
  }
}

@media (max-width: 767px) {
  .marquee-band {
    padding-block: 2.25rem;
  }

  .marquee-band__title {
    font-size: clamp(1.15rem, 4.5vw, 1.45rem);
    padding-inline: 0.25rem;
  }

  .marquee-band__count {
    display: block;
    margin-block: 0.15rem;
    font-size: 1.35em;
  }

  .marquee-band__stats {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    max-width: 16rem;
    margin-inline: auto;
  }

  .marquee-band__stat {
    justify-content: center;
  }

  .marquee-track {
    gap: 0.55rem;
  }

  .marquee-partner {
    min-width: 5.5rem;
    height: 3.25rem;
    padding: 0.55rem 0.85rem;
  }

  .marquee-partner__logo-img {
    height: 1.5rem;
    max-width: 6.5rem;
  }
}

.page-enter {
  animation: pageFadeIn 0.15s ease;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.counter-value {
  font-variant-numeric: tabular-nums;
}

/* Hero reveal — fade nhẹ, stagger tinh tế */
html.hero-reveal-enabled .hero-reveal__item {
  opacity: 0;
  transform: translateY(1.1rem);
  filter: blur(6px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform, filter;
}

html.hero-reveal-enabled .hero-reveal.is-active .hero-reveal__item {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

html.hero-reveal-enabled .hero-reveal__title .hero-reveal__line {
  display: block;
  opacity: 0;
  transform: translateY(0.85rem);
  filter: blur(5px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--reveal-delay, 0s) + var(--line-delay, 0s));
}

html.hero-reveal-enabled .hero-reveal.is-active .hero-reveal__title .hero-reveal__line {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

html.hero-reveal-enabled .hero-reveal.is-active .hero-reveal__title.hero-reveal__item {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
}

.hero-reveal__title .theme-tertiary {
  transition: text-shadow 1.2s ease 0.9s;
}

.hero-reveal.is-active .hero-reveal__title .theme-tertiary {
  text-shadow: 0 0 28px color-mix(in srgb, var(--color-tertiary, #fbbf24) 35%, transparent);
}

html.hero-reveal-enabled .hero-reveal__actions a {
  opacity: 0;
  transform: translateY(0.5rem);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

html.hero-reveal-enabled .hero-reveal.is-active .hero-reveal__actions a {
  opacity: 1;
  transform: translateY(0);
}

html.hero-reveal-enabled .hero-reveal.is-active .hero-reveal__actions a:nth-child(1) { transition-delay: calc(var(--reveal-delay, 0s) + 0.05s); }
html.hero-reveal-enabled .hero-reveal.is-active .hero-reveal__actions a:nth-child(2) { transition-delay: calc(var(--reveal-delay, 0s) + 0.14s); }
html.hero-reveal-enabled .hero-reveal.is-active .hero-reveal__actions a:nth-child(3) { transition-delay: calc(var(--reveal-delay, 0s) + 0.23s); }

@media (prefers-reduced-motion: reduce) {
  .hero-reveal__item,
  .hero-reveal__title .hero-reveal__line,
  .hero-reveal__actions a {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .hero-reveal__title .theme-tertiary {
    text-shadow: none !important;
  }
}
