@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/NotoSansThai-300.ttf') format('truetype');
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoSansThai-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/NotoSansThai-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/NotoSansThai-700.ttf') format('truetype');
}

:root {
  --bg: #080c18;
  --bg-alt: #0d1224;
  --surface: #111829;
  --surface-2: #162040;
  --text: #eef1fb;
  --muted: #8d97bb;
  --accent: #6ee7ff;
  --accent-2: #9b6fff;
  --accent-3: #ff7eb6;
  --border: rgba(110, 231, 255, 0.1);
  --border-soft: rgba(255,255,255,0.06);
  --glow-cyan: rgba(110, 231, 255, 0.18);
  --glow-purple: rgba(139, 92, 246, 0.22);
  --shadow: 0 24px 80px rgba(2, 6, 20, 0.6);
  --radius: 20px;
  --radius-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Thai', 'IBM Plex Sans Thai', 'IBM Plex Sans', 'Leelawadee UI', 'Tahoma', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 5% 0%, rgba(110,231,255,0.13) 0%, transparent 65%),
    radial-gradient(ellipse 700px 400px at 95% 5%, rgba(155,111,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 500px 300px at 50% 80%, rgba(255,126,182,0.06) 0%, transparent 60%),
    linear-gradient(180deg, #080c18 0%, #090d1e 100%);
  min-height: 100vh;
  line-height: 1.75;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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='1'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #c2f5ff; }

.container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 60px 28px 96px;
}

/* ── Lang switcher ── */
.lang-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 40px;
}

.lang-switch {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
}

.lang-btn {
  padding: 6px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s;
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(110,231,255,0.2), rgba(155,111,255,0.2));
  color: var(--accent);
  box-shadow: 0 0 16px rgba(110,231,255,0.15);
}

.lang-btn:hover:not(.active) { color: var(--text); }

/* ── Hero ── */
.hero {
  margin-bottom: 56px;
  animation: fadeUp 0.7s ease both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(110,231,255,0.1);
  border: 1px solid rgba(110,231,255,0.25);
  color: #a8f4ff;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #eef1fb 30%, #9dd8ff 70%, #c2a8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--muted);
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 4px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
}

/* ── Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 52px;
}

.card {
  position: relative;
  padding: 28px 28px 32px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(22,32,64,0.9), rgba(14,20,44,0.85));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
  animation: fadeUp 0.7s ease both;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110,231,255,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 32px 80px rgba(2,6,20,0.7), 0 0 30px rgba(110,231,255,0.08); border-color: rgba(110,231,255,0.25); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.card-icon.cyan { background: rgba(110,231,255,0.12); }
.card-icon.purple { background: rgba(155,111,255,0.12); }

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.card-arrow {
  margin-top: auto;
  padding-top: 14px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.7;
  transition: opacity 0.2s, gap 0.2s;
}

.card:hover .card-arrow { opacity: 1; gap: 10px; }

/* ── Sections ── */
.section-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.section {
  padding: 28px 32px;
  border-radius: var(--radius);
  background: rgba(13,18,36,0.7);
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  animation: fadeUp 0.6s ease both;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s;
}

.section:hover { border-color: rgba(110,231,255,0.12); }

.section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  flex-shrink: 0;
}

.section p { color: var(--muted); line-height: 1.8; }

.section ul {
  padding-left: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
}

.section li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.section li::before {
  content: '›';
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  flex-shrink: 0;
}

/* ── Section header ── */
.section-header {
  margin: 48px 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeUp 0.6s ease both;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-soft), transparent);
}

/* ── Top link ── */
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(155,111,255,0.1);
  border: 1px solid rgba(155,111,255,0.25);
  color: #d0c0ff;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.25s;
}

.top-link:hover {
  background: rgba(155,111,255,0.18);
  color: #e8dcff;
  transform: translateX(-2px);
}

/* ── Footer ── */
.footer {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer::before, .footer::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--border-soft);
}

/* ── Language visibility ── */
[data-lang] { display: none; }
[data-lang].visible { display: block; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger children */
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.section:nth-child(1) { animation-delay: 0.04s; }
.section:nth-child(2) { animation-delay: 0.08s; }
.section:nth-child(3) { animation-delay: 0.12s; }
.section:nth-child(4) { animation-delay: 0.16s; }
.section:nth-child(5) { animation-delay: 0.2s; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .container { padding: 44px 18px 72px; }
  .section { padding: 20px 20px; }
  .hero h1 { font-size: 2rem; }
  .top-link { display: none; }
  .page-nav { justify-content: flex-end; }
}
