/*
  3D Landing Styles – tối ưu cho hiệu năng và tính đáp ứng
*/

:root {
  --bg-0: #070a13; /* nền tối */
  --bg-1: #0d1222; /* gradient layer */
  --acc-0: #7bdff2; /* accent nhạt */
  --acc-1: #b97aff; /* accent tím */
  --text-0: #e7ecf3; /* chữ chính */
  --text-1: #b8c2d6; /* chữ phụ */
  --glass: rgba(255, 255, 255, 0.06);
  --glass-brd: rgba(255, 255, 255, 0.2);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text-0);
  background: radial-gradient(1200px 800px at 70% 10%, #151b31 0%, var(--bg-1) 50%, var(--bg-0) 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Header logo */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(7,10,19,0.85), rgba(7,10,19,0));
  pointer-events: none; /* để không cản trở tương tác hero */
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45));
  pointer-events: auto; /* cho phép kéo thả, copy ảnh nếu muốn */
}

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#scene canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero__inner {
  max-width: 960px;
  width: 100%;
  text-align: center;
  padding: clamp(16px, 2.5vw, 40px);
  background: linear-gradient(180deg, rgba(12,16,30,0.4), rgba(12,16,30,0.2));
  border: 1px solid var(--glass-brd);
  border-radius: 16px;
  backdrop-filter: saturate(130%) blur(12px);
  -webkit-backdrop-filter: saturate(130%) blur(12px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}

.hero__title {
  margin: 0 0 12px 0;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.hero__subtitle {
  margin: 0 auto 24px auto;
  max-width: 720px;
  font-size: clamp(14px, 2.2vw, 18px);
  color: var(--text-1);
}

.hero__cta { margin-top: 8px; }

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.22);
  text-decoration: none;
  font-weight: 700;
  color: #0b0f1a;
  background: linear-gradient(135deg, var(--acc-0), var(--acc-1));
  box-shadow: 0 12px 26px rgba(121, 92, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(121, 92, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.55);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.footer {
  position: fixed;
  inset: auto 0 12px 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  font-size: 12px;
  pointer-events: none;
}

/* Fallback khi không có WebGL hoặc JS */
.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #0e1324, #0b0f1a);
  color: var(--text-0);
  z-index: 9999;
  padding: 16px;
}

/* Tối ưu chuyển động theo hệ thống */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

@media (max-width: 640px) {
  .hero__inner { border-radius: 12px; padding: 18px; }
  .btn { height: 48px; border-radius: 12px; }
}


