:root {
  color-scheme: light;
  font-family:
    Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f8f6;
}

.demo-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
}

.hero-counter-flip {
  position: relative;
  z-index: 4;
  display: block;
  width: 100px;
  height: 100px;
  color: #063c32;
  text-decoration: none;
  perspective: 800px;
}

.hero-counter-flip__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: heroCounterFlip 6s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

.hero-counter-flip__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px;
  overflow: hidden;
  color: white;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  letter-spacing: 0.04em;
  background: linear-gradient(145deg, rgba(120, 255, 238, 0.95), rgba(28, 141, 116, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24), 0 0 22px rgba(0, 201, 160, 0.38);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.hero-counter-flip__front img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.hero-counter-flip__back {
  background: linear-gradient(145deg, rgba(120, 255, 238, 0.95), rgba(12, 112, 90, 0.96));
  transform: rotateY(180deg);
  text-shadow: 0 0 10px rgba(0,0,0,0.2);

}

.hero-counter-flip__back strong {
  color: #ffce3d;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.03em;
}

.hero-counter-flip:hover .hero-counter-flip__face,
.hero-counter-flip:focus-visible .hero-counter-flip__face {
  border-color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 28px rgba(0, 201, 160, 0.58);
}

.hero-counter-flip:focus-visible {
  outline: 3px solid #ffca28;
  outline-offset: 4px;
  border-radius: 50%;
}

@keyframes heroCounterFlip {
  0%,
  40% {
    transform: rotateY(0deg);
  }
  50%,
  90% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.order-counter-include {
  min-height: clamp(160px, 24vw, 260px);
  background: #071c12;
  scroll-margin-top: calc(var(--nav-h, 80px) + 12px);
}

.order-counter {
  position: relative;
  isolation: isolate;
  width: 100%;
  scroll-margin-top: calc(var(--nav-h, 80px) + 12px);
  padding: clamp(34px, 7vw, 72px) clamp(20px, 7vw, 64px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  /* background: #071c12; */
  background: url(images/green_background2.jpg);
}

.order-counter::before,
.order-counter::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.order-counter::before {
  z-index: 0;
  background: url("https://images.unsplash.com/photo-1518531933037-91b2f5f229cc?w=1920&q=40") center / cover no-repeat;
  opacity: 0.05;
}

.order-counter::after {
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(5, 22, 15, 0.96) 0%,
    rgba(0, 64, 45, 0.72) 48%,
    rgba(5, 22, 15, 0.96) 100%
  );
  background-size: 200% 200%;
  animation: orderCounterGradientShift 8s ease infinite;
}

.order-counter > :not(.order-counter__scan, .order-counter__glow) {
  position: relative;
  z-index: 4;
}

.order-counter__scan {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  height: 1px;
  background: linear-gradient(to right, transparent, #00c9a0, transparent);
  opacity: 0.38;
  pointer-events: none;
  animation: orderCounterScanLine 5s linear infinite;
}

.order-counter__glow {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orderCounterGlow 5s ease-in-out infinite alternate;
}

.order-counter__glow--cyber {
  top: -220px;
  right: -80px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(0, 201, 160, 0.28) 0%, transparent 70%);
}

.order-counter__glow--gold {
  bottom: -240px;
  left: 8%;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 202, 40, 0.22) 0%, transparent 70%);
  animation-delay: -2.5s;
}

@keyframes orderCounterGradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes orderCounterScanLine {
  from {
    transform: translateY(-1px);
  }
  to {
    transform: translateY(100vh);
  }
}

@keyframes orderCounterGlow {
  from {
    opacity: 0.55;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1.08);
  }
}

.order-counter__headline {
  margin: 0 0 24px;
  color: #fff;
  font-family: "Noto Sans TC", sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.2;
}

.order-counter__eyebrow {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.14em;
}

.order-counter__metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: end;
  gap: clamp(7px, 2vw, 24px);
  width: min(100%, 700px);
  margin: 4px auto 0;
}

.order-counter__metric {
  min-width: 0;
}

.order-counter__metric-label {
  margin: 0 0 11px;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(0.78rem, 1.8vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.order-counter__divider {
  align-self: stretch;
  width: 1px;
  min-height: 86px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.34), transparent);
}

.order-counter__number {
  display: flex;
  justify-content: center;
  gap: clamp(1.5px, 0.6vw, 5px);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.15rem, 3.5vw, 3.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.order-counter__number--amount {
  gap: clamp(1px, 0.35vw, 4px);
  font-size: clamp(1.15rem, 3.5vw, 3.4rem);
  letter-spacing: -0.03em;
}

.order-counter__currency,
.order-counter__separator {
  display: block;
  flex: 0 0 auto;
  align-self: flex-end;
  height: 1em;
  line-height: 1;
}

.order-counter__currency {
  margin-right: 0.12em;
  color: #ffca28;
  font-size: 0.48em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.order-counter__separator {
  width: 0.18em;
  color: rgba(255, 255, 255, 0.72);
}

.order-counter__actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(10px, 2vw, 16px);
  margin-top: clamp(22px, 4vw, 34px);
}

.order-counter__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(118px, 16vw, 156px);
  min-height: 46px;
  padding: 11px clamp(18px, 3vw, 30px);
  color: #fff;
  font-family: "Noto Sans TC", sans-serif;
  font-size: clamp(13px, 2.4vw, 14px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 40px;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.order-counter__button:hover {
  transform: translateY(-2px);
}

.order-counter__button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.order-counter__button--outline {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.65);
}

.order-counter__button--outline:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}

.order-counter__button--purchase {
  color: #071c12;
  background: linear-gradient(135deg, #ffca28, #ffb300);
  border: 2px solid transparent;
  box-shadow: 0 6px 22px rgba(255, 202, 40, 0.3);
}

.order-counter__button--purchase:hover {
  box-shadow: 0 10px 28px rgba(255, 202, 40, 0.45);
  filter: brightness(1.05);
}

.order-counter__digit {
  display: block;
  width: 0.7em;
  height: 1em;
  overflow: hidden;
}

.order-counter__number--amount .order-counter__digit {
  width: 0.62em;
}

.order-counter__track {
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.order-counter__track.is-rolling {
  transform: translate3d(0, var(--offset), 0);
  transition:
    transform var(--duration, 1500ms) cubic-bezier(0.16, 0.8, 0.22, 1)
    var(--delay, 0ms);
}

.order-counter__value {
  display: block;
  flex: 0 0 1em;
  height: 1em;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .order-counter::after,
  .order-counter__scan,
  .order-counter__glow {
    animation: none;
  }

  .order-counter__track.is-rolling {
    transition-duration: 1ms;
    transition-delay: 0ms;
  }

  .order-counter__button {
    transition: none;
  }
}
