@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&family=Roboto+Mono:wght@500;600&family=Sora:wght@600;700&display=swap');

:root {
  --msx-bg: #111a35;
  --msx-surface: #182443;
  --msx-surface-2: #223154;
  --msx-text: #f7faff;
  --msx-muted: #bbc8da;
  --msx-sky: #62c5ff;
  --msx-leaf: #ff6b45;
  --msx-gold: #ffc94a;
  --msx-mint: #58e1c3;
  --msx-border: #304568;
  --msx-max: 1240px;
  --msx-radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.msx-home {
  margin: 0;
  min-height: 100vh;
  background: var(--msx-bg);
  color: var(--msx-text);
  font-family: 'Noto Sans Thai', system-ui, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }
.msx-shell { width: min(var(--msx-max), calc(100% - 40px)); margin: 0 auto; }

.msx-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  background: rgba(17, 26, 53, .88);
  border-bottom: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(16px);
}
.msx-nav-inner { min-height: 72px; display: flex; align-items: center; gap: 26px; }
.msx-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.msx-brand img { width: 42px; height: 42px; object-fit: contain; }
.msx-brand span { font: 700 1rem 'Sora', sans-serif; letter-spacing: -.02em; }
.msx-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.msx-links a { color: var(--msx-muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.msx-links a:hover, .msx-links a:focus-visible { color: var(--msx-text); }
.msx-nav-cta { padding: 10px 17px; background: var(--msx-sky); color: #0d1830 !important; border-radius: 999px; }
.msx-nav-cta:hover { background: #8bd4ff; }

.msx-hero {
  position: relative;
  min-height: 860px;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: #0c1530;
}
.msx-hero-media { position: absolute; inset: 0; z-index: -3; }
.msx-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.035); }
.msx-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(9,15,36,.92) 0%, rgba(13,22,48,.70) 42%, rgba(12,20,45,.28) 72%), linear-gradient(0deg, var(--msx-bg) 0%, rgba(17,26,53,.10) 48%);
}
.msx-hero::after {
  content: '';
  position: absolute;
  width: min(52vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  right: -15vw;
  top: 12%;
  background: radial-gradient(circle, rgba(98,197,255,.30), rgba(88,225,195,.10) 38%, transparent 68%);
  z-index: -1;
  pointer-events: none;
}
.msx-hero-content { padding: 180px 0 112px; max-width: 760px; }
.msx-status-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.msx-live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(88,225,195,.12); border: 1px solid rgba(88,225,195,.36); color: #a8f2df; font: 600 .78rem 'Roboto Mono', monospace; }
.msx-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--msx-mint); box-shadow: 0 0 0 5px rgba(88,225,195,.10); }
.msx-version { color: var(--msx-muted); font: 500 .78rem 'Roboto Mono', monospace; }
.msx-logo-hero { width: min(420px, 76vw); height: auto; display: block; margin-bottom: 18px; filter: drop-shadow(0 14px 26px rgba(0,0,0,.34)); }
.msx-hero h1 { font: 700 clamp(2.75rem, 7vw, 5.75rem)/.98 'Sora', 'Noto Sans Thai', sans-serif; letter-spacing: -.035em; margin: 0 0 22px; text-wrap: balance; }
.msx-hero p { max-width: 650px; color: #d9e3f1; font-size: clamp(1rem, 1.7vw, 1.22rem); line-height: 1.75; margin: 0 0 30px; }
.msx-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.msx-button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 700; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.msx-button:hover { transform: translateY(-2px); }
.msx-button-primary { background: var(--msx-sky); color: #0d1830; }
.msx-button-secondary { border: 1px solid rgba(255,255,255,.30); background: rgba(17,26,53,.38); color: white; }
.msx-button:focus-visible, .msx-links a:focus-visible { outline: 3px solid var(--msx-gold); outline-offset: 3px; }

.msx-pulse { position: relative; margin-top: -42px; z-index: 5; }
.msx-pulse-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: #f7faff; color: #111a35; border-radius: var(--msx-radius); overflow: hidden; box-shadow: 0 18px 42px rgba(5,10,25,.24); }
.msx-pulse-item { padding: 24px 26px; border-right: 1px solid #dfe8f5; text-decoration: none; min-width: 0; }
.msx-pulse-item:last-child { border-right: 0; }
.msx-pulse-label { color: #65728a; font: 600 .72rem 'Roboto Mono', monospace; text-transform: uppercase; letter-spacing: .05em; }
.msx-pulse-value { display: block; margin-top: 7px; font: 700 1rem/1.35 'Sora', 'Noto Sans Thai', sans-serif; }

.msx-section { padding: 110px 0; }
.msx-section-light { background: #f7faff; color: #111a35; }
.msx-section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 42px; }
.msx-section h2 { max-width: 760px; font: 700 clamp(2rem, 4vw, 3.6rem)/1.08 'Sora', 'Noto Sans Thai', sans-serif; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.msx-section-lead { max-width: 620px; color: var(--msx-muted); line-height: 1.75; margin-top: 15px; }
.msx-section-light .msx-section-lead { color: #65728a; }
.msx-text-link { color: inherit; font-weight: 700; text-underline-offset: 4px; }

.msx-feature { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 28px; align-items: stretch; }
.msx-feature-visual { min-height: 520px; border-radius: var(--msx-radius); overflow: hidden; position: relative; background: #0c1530; }
.msx-feature-visual img { width: 100%; height: 100%; object-fit: cover; }
.msx-feature-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,10,25,.84), transparent 58%); }
.msx-feature-copy { position: absolute; left: 30px; right: 30px; bottom: 28px; z-index: 2; color: white; }
.msx-feature-copy span { color: #bde9ff; font: 600 .74rem 'Roboto Mono', monospace; }
.msx-feature-copy h3 { margin: 8px 0 0; font: 700 clamp(1.6rem, 3vw, 2.5rem)/1.1 'Sora', 'Noto Sans Thai', sans-serif; }
.msx-news-list { display: flex; flex-direction: column; border-top: 1px solid #dce5f2; }
.msx-news-row { padding: 23px 2px; border-bottom: 1px solid #dce5f2; text-decoration: none; }
.msx-news-row small { display: block; color: #738096; font: 500 .72rem 'Roboto Mono', monospace; margin-bottom: 7px; }
.msx-news-row strong { display: block; line-height: 1.45; }

.msx-world-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; }
.msx-world-copy { align-self: center; padding-right: 40px; }
.msx-world-copy p { color: var(--msx-muted); line-height: 1.8; max-width: 620px; }
.msx-world-proof { border-top: 1px solid var(--msx-border); margin-top: 30px; }
.msx-proof-row { padding: 18px 0; border-bottom: 1px solid var(--msx-border); display: flex; justify-content: space-between; gap: 24px; }
.msx-proof-row strong { font-family: 'Sora', sans-serif; }
.msx-proof-row span { color: var(--msx-muted); text-align: right; }
.msx-world-media { min-height: 560px; border-radius: var(--msx-radius); overflow: hidden; }
.msx-world-media img { width: 100%; height: 100%; object-fit: cover; }

.msx-ready { background: var(--msx-leaf); color: #fff; }
.msx-ready-grid { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; }
.msx-ready p { max-width: 700px; line-height: 1.75; color: #fff4f0; }
.msx-ready .msx-button-primary { background: #fff; color: #8d2d18; }

.msx-footer { border-top: 1px solid var(--msx-border); padding: 34px 0 48px; color: var(--msx-muted); font-size: .84rem; line-height: 1.7; }
.msx-footer-grid { display: flex; justify-content: space-between; gap: 26px; align-items: start; }
.msx-footer a { color: var(--msx-text); }

@media (max-width: 900px) {
  .msx-links a:not(.msx-nav-cta) { display: none; }
  .msx-hero { min-height: 760px; }
  .msx-pulse-grid { grid-template-columns: 1fr 1fr; }
  .msx-pulse-item:nth-child(2) { border-right: 0; }
  .msx-pulse-item:nth-child(-n+2) { border-bottom: 1px solid #dfe8f5; }
  .msx-feature, .msx-world-grid, .msx-ready-grid { grid-template-columns: 1fr; }
  .msx-world-copy { padding-right: 0; }
}

@media (max-width: 600px) {
  .msx-shell { width: min(100% - 28px, var(--msx-max)); }
  .msx-nav-inner { min-height: 64px; gap: 12px; }
  .msx-brand span { display: none; }
  .msx-hero { min-height: 720px; }
  .msx-hero-content { padding: 136px 0 92px; }
  .msx-pulse { margin-top: -26px; }
  .msx-pulse-grid { grid-template-columns: 1fr; }
  .msx-pulse-item { border-right: 0; border-bottom: 1px solid #dfe8f5; }
  .msx-pulse-item:last-child { border-bottom: 0; }
  .msx-section { padding: 82px 0; }
  .msx-section-head { display: block; }
  .msx-feature-visual, .msx-world-media { min-height: 420px; }
  .msx-footer-grid { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .msx-hero-media img { transform: none; }
}
