/* UNext website (unext.web.app). Same design language as utc.liveder.tv (UTC Next). */

:root {
  --bg: #101418;
  --surface: #1a2026;
  --surface2: #232b33;
  --surface3: #2b3540;
  --border: #313c46;
  --text: #e8edf2;
  --text-dim: #93a1ad;
  --accent: #2fa6ff;
  --accent-soft: rgba(47, 166, 255, 0.14);
  --good: #37ad5f;
  --warn: #e0a63c;
  --bad: #e0483c;
  --radius: 8px;
  --radius-lg: 16px;
  --field-bg: #0d1114;
  --font: 'IBM Plex Sans Thai', 'Leelawadee UI', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Cascadia Mono', 'Consolas', 'SF Mono', monospace;
  --nav-h: 64px;
  --container: 1140px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 78% -220px, rgba(47, 166, 255, 0.09), transparent 62%),
    radial-gradient(900px 560px at 8% 12%, rgba(47, 166, 255, 0.04), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
code { font-family: var(--font-mono); font-size: 0.88em; background: var(--field-bg); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: #9fd4ff; }
::selection { background: rgba(47, 166, 255, 0.35); }

.container { width: min(var(--container), calc(100% - 32px)); margin-inline: auto; }
.section { padding: 104px 0; }
.section-head { max-width: 660px; margin: 0 auto 56px; text-align: center; }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(47, 166, 255, 0.3);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 18px;
}
.section-title { font-size: clamp(28px, 4vw, 38px); font-weight: 700; letter-spacing: -0.01em; }
.section-sub { margin: 14px 0 0; color: var(--text-dim); font-size: 17px; }

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(16, 20, 24, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(49, 60, 70, 0.65);
}
.site-nav .container { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 17px; letter-spacing: 0.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand em { font-style: normal; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: var(--radius); transition: color .18s, background .18s; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.nav-links a.btn { color: #fff; margin-left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 600 16px/1 var(--font); padding: 14px 26px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(180deg, #3cb0ff, #1f8fe6); color: #fff; box-shadow: 0 6px 24px rgba(47, 166, 255, 0.35), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { box-shadow: 0 10px 32px rgba(47, 166, 255, 0.5), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: #46566480; background: rgba(255, 255, 255, 0.07); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 8px; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; box-shadow: none; }

/* Hero */
.hero { padding: 84px 0 40px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.hero h1 { margin: 26px 0 0; font-size: clamp(40px, 7vw, 76px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.18; }
.hero h1 .brandline { display: block; }
.hero h1 .brandline em { font-style: normal; color: var(--accent); text-shadow: 0 0 40px rgba(47, 166, 255, .35); }
.hero-sub { max-width: 640px; margin: 22px auto 0; color: var(--text-dim); font-size: clamp(16px, 2vw, 19px); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.hero-note { margin: 18px 0 0; font-size: 14px; color: var(--text-dim); }

/* Hero mock: a drawing of the UNext window */
.mock {
  margin: 64px auto 0; max-width: 1000px; text-align: left;
  background: linear-gradient(180deg, #1c232a, #161c21); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255,255,255,.02), 0 0 80px rgba(47, 166, 255, .08);
  overflow: hidden; font-size: 11px; letter-spacing: .04em;
}
.mock-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: #151a1f; }
.mock-bar b { font-size: 12px; letter-spacing: .12em; }
.mock-bar .pill { border: 1px solid var(--border); border-radius: 5px; padding: 2px 9px; color: var(--text-dim); font-size: 10px; }
.mock-bar .pill.on { color: #fff; background: var(--accent-soft); border-color: rgba(47,166,255,.5); }
.mock-bar .rec { color: #fff; background: var(--bad); border-color: var(--bad); }
.mock-bar .sp { margin-left: auto; }
.mock-body { display: grid; grid-template-columns: 1fr 112px 1fr; gap: 14px; padding: 16px; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; border: 2px solid #3a4a58; }
.screen.pv { border-color: var(--good); }
.screen.pg { border-color: var(--bad); }
.screen .tag { position: absolute; left: 8px; top: 8px; font-weight: 700; font-size: 10px; padding: 2px 8px; border-radius: 4px; color: #fff; z-index: 2; }
.screen.pv .tag { background: var(--good); }
.screen.pg .tag { background: var(--bad); }
.scene-a { position: absolute; inset: 0; background: radial-gradient(60% 80% at 70% 30%, #4a7fb0, transparent 70%), linear-gradient(160deg, #24435f, #0f1d2a); }
.scene-a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(170deg, transparent 30%, #0c1620 31%); }
.scene-b { position: absolute; inset: 0; background: radial-gradient(40% 50% at 30% 40%, #e08a3c, transparent 70%), linear-gradient(200deg, #3b2a4f, #140f1d); }
.lower3 { position: absolute; left: 7%; bottom: 10%; right: 30%; z-index: 1; }
.lower3 .l1 { background: linear-gradient(90deg, #2fa6ff, #1f6fe0); color: #fff; font-weight: 700; padding: 4px 10px; font-size: 11px; border-radius: 3px 3px 0 0; width: max-content; max-width: 100%; }
.lower3 .l2 { background: rgba(10, 14, 18, .85); color: var(--text); padding: 3px 10px; font-size: 10px; border-radius: 0 3px 3px 3px; }
.screen .tc { position: absolute; right: 8px; bottom: 6px; font-family: var(--font-mono); font-size: 10px; color: #dfe8ef; z-index: 2; }
.trans { display: flex; flex-direction: column; gap: 7px; }
.tbtn { text-align: center; border: 1px solid var(--border); background: var(--surface2); border-radius: 5px; padding: 7px 0; font-weight: 600; font-size: 10px; color: var(--text); }
.tbtn.cut { background: #3a1e1e; border-color: #6a2b2b; }
.tbtn.hot { background: var(--accent-soft); border-color: rgba(47,166,255,.55); }
.tbar { position: relative; flex: 1; min-height: 44px; border-radius: 5px; background: var(--field-bg); border: 1px solid var(--border); }
.tbar::before { content: ''; position: absolute; left: 50%; top: 8px; bottom: 8px; width: 3px; transform: translateX(-50%); background: linear-gradient(var(--accent) 38%, #2b3540 38%); border-radius: 2px; }
.tbar::after { content: ''; position: absolute; left: 18%; right: 18%; top: 32%; height: 10px; border-radius: 3px; background: #dfe7ee; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.mock-inputs { display: grid; grid-template-columns: repeat(6, 1fr) 150px; gap: 10px; padding: 0 16px 16px; }
.tile { border-radius: 5px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.tile .th { position: relative; aspect-ratio: 16/9; }
.tile .nm { padding: 4px 6px; font-size: 9.5px; color: var(--text-dim); display: flex; justify-content: space-between; }
.tile.live { border-color: var(--bad); }
.tile.next { border-color: var(--good); }
.th.c1 { background: linear-gradient(160deg, #24435f, #0f1d2a); }
.th.c2 { background: linear-gradient(200deg, #3b2a4f, #140f1d); }
.th.c3 { background: repeating-linear-gradient(90deg, #c8c8c8 0 14%, #c8c814 14% 28%, #14c8c8 28% 42%, #14c814 42% 57%, #c814c8 57% 71%, #c81414 71% 85%, #1414c8 85%); }
.th.c4 { background: linear-gradient(135deg, #1d3a2a, #0e1a13); }
.th.c5 { background: radial-gradient(circle at 50% 55%, #2fa6ff 0 18%, transparent 19%), #0d1620; }
.th.c6 { background: linear-gradient(180deg, transparent 60%, #1f6fe0 60% 74%, rgba(10,14,18,.9) 74%), repeating-conic-gradient(#2a2f35 0 25%, #20252a 0 50%) 0 0/12px 12px; }
.meters { display: flex; gap: 6px; align-items: flex-end; padding: 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.meter { flex: 1; height: 72px; border-radius: 2px; background: #0d1114; position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, #37ad5f 0 60%, #e0a63c 60% 82%, #e0483c 82%); background-size: 100% 72px; background-position: bottom; animation: bounce 1.6s ease-in-out infinite alternate; }
.meter:nth-child(2) i { animation-duration: 1.3s; }
.meter:nth-child(3) i { animation-duration: 1.9s; }
.meter:nth-child(4) i { animation-duration: 1.1s; }
@keyframes bounce { from { height: 38%; } to { height: 78%; } }
@media (prefers-reduced-motion: reduce) { .meter i { animation: none; height: 60%; } html { scroll-behavior: auto; } }

/* Features */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--surface), #171c22); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(47, 166, 255, .45); transform: translateY(-2px); }
.icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(47, 166, 255, .3); margin-bottom: 18px; }
.icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; font-weight: 600; }
.card p { margin: 8px 0 0; color: var(--text-dim); font-size: 15px; }

/* Steps */
.quickstart { background: linear-gradient(180deg, transparent, rgba(26, 32, 38, .55) 30%, rgba(26, 32, 38, .55) 70%, transparent); }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(180deg, #3cb0ff, #1f8fe6); box-shadow: 0 0 18px rgba(47,166,255,.4); margin-bottom: 18px; }
.qs-note { text-align: center; color: var(--text-dim); margin: 36px 0 0; }

/* Licence */
.licence { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
.keybox {
  font-family: var(--font-mono); font-size: 14px; color: #9fd4ff; background: var(--field-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px; letter-spacing: .06em; word-break: break-all;
}
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; color: var(--text-dim); }
.checks li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.status-demo { display: grid; gap: 10px; }
.status { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; font-size: 15px; }
.status small { margin-left: auto; color: var(--text-dim); font-size: 13px; }
.status .dot.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.status .dot.off { background: #5b6874; box-shadow: none; }

/* Download */
.download {
  max-width: 820px; margin: 0 auto; text-align: center; padding: 56px 40px;
  background: radial-gradient(500px 220px at 50% 0, rgba(47, 166, 255, .12), transparent 70%), linear-gradient(180deg, var(--surface), #161b20);
  border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.dl-meta { margin: 16px 0 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
.dl-notes { margin: 8px auto 0; max-width: 560px; color: var(--text-dim); font-size: 15px; }
.req { margin: 32px auto 0; max-width: 560px; text-align: left; background: var(--field-bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; }
.req h3 { font-size: 15px; margin-bottom: 8px; }
.req ul { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid rgba(49, 60, 70, .65); padding: 36px 0; margin-top: 104px; color: var(--text-dim); font-size: 14px; }
.site-footer .container { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-footer .brand { font-size: 15px; }
.site-footer .brand img { width: 24px; height: 24px; }
.footer-links { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); }

/* Responsive */
@media (max-width: 900px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
  .licence { grid-template-columns: 1fr; }
  .mock-inputs { grid-template-columns: repeat(3, 1fr); }
  .mock-inputs .meters { grid-column: 1 / -1; }
  .meter { height: 40px; }
}
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .section { padding: 72px 0; }
  .grid3 { grid-template-columns: 1fr; }
  .mock-body { grid-template-columns: 1fr; }
  .trans { flex-direction: row; }
  .trans .tbar { display: none; }
  .tbtn { flex: 1; }
  .mock-bar .pill.hide-s { display: none; }
  .download { padding: 40px 20px; }
  .card { padding: 22px; }
}
