* {
  font-family: "Noto Sans Thai", "Inter", sans-serif;
}
.font-en {
  font-family: "Inter", sans-serif;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  position: relative;
}

/* ===== Scroll Progress Bar ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  z-index: 100;
  background: linear-gradient(90deg, #fd802e, #ffad6b, #fd802e);
  transform-origin: left;
  transform: scaleX(0);
  transition: none;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #fd802e;
  border-radius: 3px;
}

/* ===== Grain Overlay ===== */
.grain::before {
  content: "";
  position: fixed;
  inset: -200%;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ===== Core Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.reveal-blur {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(30px);
  transition:
    opacity 1s ease,
    filter 1s ease,
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-blur.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Stagger delays */
.d1 {
  transition-delay: 0.1s;
}
.d2 {
  transition-delay: 0.2s;
}
.d3 {
  transition-delay: 0.3s;
}
.d4 {
  transition-delay: 0.4s;
}
.d5 {
  transition-delay: 0.5s;
}
.d6 {
  transition-delay: 0.6s;
}
.d7 {
  transition-delay: 0.7s;
}
.d8 {
  transition-delay: 0.8s;
}

/* ===== Hero MaaS Text ===== */
/* ===== Hero MaaS Floating Words ===== */
/* ===== MaaS Title (Apple/Tesla style) ===== */
.maas-title {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: rgba(255, 255, 255, 0.95);

  display: flex;
  flex-direction: column; /* mobile = 2 lines */
  align-items: center;
  gap: clamp(0.15rem, 1.2vw, 0.6rem);

  /* responsive size */
  font-size: clamp(2.6rem, 7.6vw, 6.8rem);

  /* กันบรรทัดกระดก */
  text-wrap: balance;
  user-select: none;
}

.maas-line {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(0.25rem, 1.3vw, 0.9rem);
  white-space: nowrap;
}

/* Desktop = 1 line */
@media (min-width: 1024px) {
  .maas-title {
    flex-direction: row;
    gap: clamp(0.25rem, 1.4vw, 1rem);
  }
  .maas-line-1 {
    margin-right: clamp(0.2rem, 0.8vw, 0.6rem);
  }
}

/* ===== Floating word animation ===== */
.maas-word {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 70px, 0) rotateX(28deg) scale(0.98);
  filter: blur(10px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.9s ease,
    color 0.25s ease,
    text-shadow 0.25s ease;
  will-change: transform, opacity, filter;
}

/* JS ใส่ .show แล้วคำจะ “ลอยเข้ามา” */
.maas-word.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateX(0) scale(1);
  filter: blur(0);
}

/* Hover เปลี่ยนสี + glow */
.maas-word:hover {
  color: #fd802e; /* pumpkin */
  text-shadow: 0 14px 42px rgba(253, 128, 46, 0.35);
}

/* Hero subtitle word animation */
.subtitle-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.subtitle-word.show {
  opacity: 1;
  transform: translateY(0);
}

/* Hero glow orbs */
@keyframes float-slow {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}
@keyframes float-medium {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-40px, -30px) scale(1.1);
  }
}
.glow-orb-1 {
  animation: float-slow 12s ease-in-out infinite;
}
.glow-orb-2 {
  animation: float-medium 10s ease-in-out infinite;
}
.glow-orb-3 {
  animation: float-slow 15s ease-in-out infinite reverse;
}

/* Light beam */
@keyframes beam-sweep {
  0% {
    transform: translateX(-100%) rotate(25deg);
  }
  100% {
    transform: translateX(200vw) rotate(25deg);
  }
}
.light-beam {
  position: absolute;
  width: 200px;
  height: 800px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(253, 128, 46, 0.04),
    transparent
  );
  animation: beam-sweep 8s ease-in-out infinite;
}

/* Hero parallax layers */
.parallax-bg {
  will-change: transform;
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(135deg, #fd802e 0%, #ffad6b 50%, #fd802e 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}
@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ===== Glassmorphism Nav ===== */
.nav-glass {
  background: rgba(35, 61, 76, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ===== Card Effects ===== */
.premium-card {
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s ease;
  will-change: transform;
}
.premium-card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 25px 50px rgba(35, 61, 76, 0.12),
    0 0 0 1px rgba(253, 128, 46, 0.08);
}

/* Glow card (for dark sections) */
.glow-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s ease;
}
.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(253, 128, 46, 0.06),
    transparent 40%
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.glow-card:hover::before {
  opacity: 1;
}
.glow-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ===== Initiative Cards ===== */
.initiative-card {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.initiative-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Partner Carousel ===== */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.carousel-track {
  animation: scroll-left 30s linear infinite;
}
.carousel-track:hover {
  animation-play-state: paused;
}

/* ===== Section Divider ===== */
.section-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #fd802e, #ffad6b);
  border-radius: 2px;
}

/* ===== Count Number ===== */
.count-number {
  font-variant-numeric: tabular-nums;
  font-family: "Inter", sans-serif;
}

/* ===== Pulse Dot ===== */
@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #fd802e;
  animation: pulse-ring 1.5s ease-out infinite;
}

/* ===== Smooth image reveal ===== */
.img-reveal {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-reveal.visible {
  clip-path: inset(0 0 0 0);
}

/* ===== Horizontal Line Expand ===== */
.line-expand {
  width: 0;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.line-expand.visible {
  width: 60px;
}

/* ===== CTA Button Glow ===== */
.btn-glow {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.btn-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #fd802e, #ffad6b, #fd802e);
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.3s ease;
}
.btn-glow:hover::after {
  opacity: 0.6;
}
.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(253, 128, 46, 0.35);
} /* ===== Partner Carousel Premium ===== */
.carousel-mask {
  padding: 0 24px;
  border-radius: 24px;
  overflow: hidden;
}

.carousel-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  z-index: 10;
  pointer-events: none;
  opacity: 0.95;
}
.carousel-edge.left {
  left: 0;
  background: linear-gradient(
    90deg,
    rgba(248, 247, 244, 1) 0%,
    rgba(248, 247, 244, 0) 100%
  );
}
.carousel-edge.right {
  right: 0;
  background: linear-gradient(
    270deg,
    rgba(248, 247, 244, 1) 0%,
    rgba(248, 247, 244, 0) 100%
  );
}

/* smoother track */
.carousel-track.premium {
  will-change: transform;
  animation: scroll-left 26s linear infinite;
}
.carousel-mask:hover .carousel-track.premium {
  animation-play-state: paused;
}

/* partner pill */
.partner-pill {
  min-width: 170px;
  height: 64px;
  padding: 0 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(35, 61, 76, 0.06);
  box-shadow: 0 12px 24px rgba(35, 61, 76, 0.06);

  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease;
  position: relative;
  overflow: hidden;
}

/* subtle shine */
.partner-pill::before {
  content: "";
  position: absolute;
  inset: -120% -60%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  transform: rotate(18deg) translateX(-40%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.partner-pill:hover::before {
  opacity: 1;
  animation: shine 1.2s ease;
}

@keyframes shine {
  0% {
    transform: rotate(18deg) translateX(-60%);
  }
  100% {
    transform: rotate(18deg) translateX(60%);
  }
}

.partner-pill:hover {
  transform: translateY(-6px);
  border-color: rgba(253, 128, 46, 0.22);
  box-shadow:
    0 22px 48px rgba(35, 61, 76, 0.1),
    0 0 0 1px rgba(253, 128, 46, 0.1);
  background: rgba(255, 255, 255, 1);
}

.partner-text {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(35, 61, 76, 0.55);
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.partner-pill:hover .partner-text {
  color: rgba(253, 128, 46, 0.95);
  transform: translateY(-1px);
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .carousel-track.premium {
    animation: none !important;
  }
  .partner-pill,
  .partner-pill::before {
    transition: none !important;
  }
}

/* ===== Back to Top Button ===== */
#to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, #fd802e, #ff9a4d);
  color: white;
  font-size: 18px;

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);

  cursor: pointer;

  /* animation base */
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  filter: blur(6px);

  transition:
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.45s ease,
    box-shadow 0.3s ease;
}

/* visible state */
#to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* hover effect */
#to-top:hover {
  box-shadow: 0 28px 60px rgba(253, 128, 46, 0.35);
  transform: translateY(-4px) scale(1.05);
}
