/* ==========================================================================
   TNT — Design Tokens
   ========================================================================== */
:root {
  /* Surfaces */
  --bg-white: #ffffff;
  --bg-soft: #fafafa;
  --bg-black: #0b0b0b;
  --bg-charcoal: #171717;

  /* Text */
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-on-dark: #f5f5f5;
  --text-on-dark-secondary: rgba(245, 245, 245, 0.64);
  --text-on-dark-muted: rgba(245, 245, 245, 0.4);

  /* Brand gradient */
  --gradient: linear-gradient(90deg, #ff5fc7 0%, #ff74b8 20%, #ff8ea1 40%, #ffb17f 68%, #ffc96b 85%, #ffd95d 100%);
  --gradient-soft: linear-gradient(90deg, rgba(255, 95, 199, 0.16) 0%, rgba(255, 138, 161, 0.16) 40%, rgba(255, 217, 93, 0.16) 100%);

  /* Glass — light */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(17, 17, 17, 0.08);
  --glass-blur: blur(20px);

  /* Glass — dark */
  --glass-dark-bg: rgba(20, 20, 20, 0.45);
  --glass-dark-border: rgba(255, 255, 255, 0.08);
  --glass-dark-blur: blur(24px);

  /* Shadows */
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
  --shadow-dark-soft: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-dark-hover: 0 24px 70px rgba(0, 0, 0, 0.5);

  /* Radius */
  --radius-card: 20px;
  --radius-btn: 16px;
  --radius-input: 16px;
  --radius-badge: 999px;

  /* Spacing — 8px grid */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 96px;
  --sp-8: 128px;

  /* Type */
  --font-display: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-logo: "League Spartan", var(--font-display);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 300ms;
  --dur-med: 500ms;
  --dur-slow: 900ms;

  /* Layout */
  --container-w: 1280px;
  --nav-h: 84px;

  /* Work flow */
  --wf-primary: #3b82f6;
  --wf-primary-glow: rgba(59, 130, 246, 0.6);
  --wf-glass-bg: rgba(255, 255, 255, 0.03);
  --wf-glass-border: rgba(255, 255, 255, 0.08);
  --wf-text-main: #f8fafc;
  --wf-text-sub: #94a3b8;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

::selection {
  background: rgba(255, 138, 161, 0.35);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--sp-2);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--gradient);
}

section[data-theme="dark"] .eyebrow {
  color: var(--text-on-dark-muted);
}

.section-head {
  max-width: 720px;
  margin: 0 0 var(--sp-6);
}

.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(32px, 5vw, 52px);
}

.section-sub {
  margin: var(--sp-2) 0 0;
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
}

section[data-theme="dark"] .section-sub {
  color: var(--text-on-dark-secondary);
}

.gradient-text {
  background: var(--gradient);
  background-clip: text;
  color: transparent;
  
  margin-top: -1em;
  display: inline-block;
  padding-top: 1em;
}

/* ==========================================================================
   Layout utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: 90vw;
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

@media (min-width: 1600px) {
  .container {
    max-width: 1680px;
  }
}

.section {
  position: relative;
  padding: var(--sp-8) 0;
}

section[data-theme="dark"] {
  background: var(--bg-black);
  color: var(--text-on-dark);
}

section[data-theme="light"] {
  background: var(--bg-soft);
}

/* ==========================================================================
   Reveal-on-scroll (JS toggles .is-visible via IntersectionObserver)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(6px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.reveal-delay-1 { transition-delay: 0.5s; }
.reveal-delay-2 { transition-delay: 1s; }
.reveal-delay-3 { transition-delay: 1.5s; }
.reveal-delay-4 { transition-delay: 2s; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  isolation: isolate;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: #16110d;
  background: var(--gradient);
  background-size: 200% auto;
  box-shadow: 0 8px 24px rgba(255, 140, 130, 0.25);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  overflow: hidden; /* Cắt phần vệt sáng thừa bên ngoài nút */
  animation: primaryGradientShift 4s ease-in-out infinite;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.5) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  z-index: 1;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 32px rgba(255, 140, 130, 0.45), 0 0 20px rgba(255, 217, 93, 0.3);
}
.btn-primary:hover::after {
  left: 150%;
  transition: left 0.6s ease; /* Tốc độ lướt của vệt sáng */
}
.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

/* Keyframe cho nền gradient chuyển động liên tục */
@keyframes primaryGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-ghost-dark {
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.btn-ghost-dark:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  color: var(--text-primary);
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
  border-color: transparent;
  box-shadow: inset 0 0 0 1.5px transparent;
  background: var(--gradient-soft);
}

/* ==========================================================================
   Glass surfaces
   ========================================================================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.glass-dark {
  background: var(--glass-dark-bg);
  backdrop-filter: var(--glass-dark-blur);
  -webkit-backdrop-filter: var(--glass-dark-blur);
  border: 1px solid var(--glass-dark-border);
  box-shadow: var(--shadow-dark-soft);
}

/* ==========================================================================
   Gradient border helper (1px gradient ring around any radius)
   ========================================================================== */
.gradient-ring {
  position: relative;
}

.gradient-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient);
  opacity: 0;
/* Hỗ trợ các trình duyệt Webkit (Chrome, Safari, Edge) */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  
  /* Tiêu chuẩn chung cho các trình duyệt hiện đại (Firefox, v.v...) */
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: opacity var(--dur-med) var(--ease);
  pointer-events: none;
}

.gradient-ring:hover::before,
.gradient-ring.is-active::before {
  opacity: 1;
}

