/* MotionMarket — Dark OLED design system */
@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Noto+Sans+JP:wght@400;500;700;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #05070f;
  --surface: #0b101e;
  --surface-2: #101729;
  --border: #1e293b;
  --border-hi: #334155;
  --primary: #3b82f6;
  --primary-deep: #2563eb;
  --accent: #f97316;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --glow: 0 0 24px rgba(59, 130, 246, .35);
  --radius: 14px;
  --font-en: 'Syncopate', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 7, 15, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: baseline; gap: 10px; }
.logo-mark {
  font-family: var(--font-en); font-weight: 700; font-size: 17px; letter-spacing: .06em;
  color: #fff; text-shadow: 0 0 14px rgba(59, 130, 246, .55);
}
.logo-mark .accent { color: var(--primary); }
.logo-sub { font-size: 10px; color: var(--dim); letter-spacing: .18em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-cta {
  background: var(--accent); color: #0b0b0b; font-weight: 700; font-size: 13px;
  padding: 9px 18px; border-radius: 999px; transition: transform .15s, box-shadow .2s;
  box-shadow: 0 0 18px rgba(249, 115, 22, .35);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(249, 115, 22, .5); color: #000; }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-canvas { position: absolute; inset: 0; opacity: .5; }
.hero-grad {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 340px at 78% 30%, rgba(37, 99, 235, .18), transparent 65%),
    linear-gradient(180deg, rgba(5,7,15,.25) 0%, rgba(5,7,15,.78) 78%, var(--bg) 100%);
}
.hero-inner { position: relative; padding: 96px 0 88px; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-hi); border-radius: 999px;
  padding: 5px 14px; font-size: 12px; color: var(--muted); margin-bottom: 26px;
  background: rgba(11, 16, 30, .6);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
h1.hero-title {
  font-size: clamp(30px, 5.4vw, 52px); font-weight: 900; line-height: 1.28; letter-spacing: .01em;
  margin-bottom: 18px;
}
.hero-title .hl {
  background: linear-gradient(92deg, #60a5fa, #3b82f6 55%, #818cf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { color: var(--muted); font-size: 16.5px; max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  border-radius: 10px; font-weight: 700; font-size: 15px;
  padding: 13px 26px; border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
  min-height: 48px;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary-deep); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--primary); box-shadow: 0 0 32px rgba(59, 130, 246, .5); }
.btn-ghost { border-color: var(--border-hi); color: var(--text); background: rgba(11, 16, 30, .5); }
.btn-ghost:hover { border-color: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #0b0b0b; box-shadow: 0 0 22px rgba(249, 115, 22, .35); }
.btn-accent:hover { box-shadow: 0 0 30px rgba(249, 115, 22, .55); }

/* ===== Stats band ===== */
.stats { border-bottom: 1px solid var(--border); background: var(--surface); }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 26px 0; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-mono); font-size: 30px; font-weight: 700; color: #fff; }
.stat-num .unit { font-size: 14px; color: var(--primary); }
.stat-label { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
@media (max-width: 720px) { .stats-inner { grid-template-columns: repeat(2, 1fr); row-gap: 22px; } }

/* ===== Sections ===== */
.section { padding: 84px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-eyebrow {
  font-family: var(--font-en); font-size: 11px; letter-spacing: .3em; color: var(--primary);
  text-transform: uppercase; margin-bottom: 12px;
}
h2.sec-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; line-height: 1.4; margin-bottom: 14px; }
.sec-lead { color: var(--muted); max-width: 640px; margin-bottom: 44px; }

/* ===== Cards ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s, transform .2s, box-shadow .25s;
}
.card:hover { border-color: var(--border-hi); }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .3); margin-bottom: 16px;
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--primary); }
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); }
.step-num { font-family: var(--font-mono); color: var(--primary); font-size: 13px; margin-bottom: 10px; }

/* ===== Catalog ===== */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  border: 1px solid var(--border-hi); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 18px; font-size: 13.5px; min-height: 40px;
  transition: all .2s;
}
.chip:hover { color: #fff; border-color: var(--primary); }
.chip.active { background: var(--primary-deep); border-color: var(--primary-deep); color: #fff; box-shadow: var(--glow); }
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border-hi); border-radius: 12px;
  padding: 0 16px; margin-bottom: 22px; transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: var(--glow); }
.search-box svg { width: 18px; height: 18px; stroke: var(--dim); flex-shrink: 0; }
.search-box input {
  flex: 1; background: transparent; border: 0; outline: 0; color: var(--text);
  font-family: var(--font-jp); font-size: 15px; padding: 14px 0; min-height: 48px;
}
.ds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .ds-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ds-grid { grid-template-columns: 1fr; } }
.ds-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.ds-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 34px rgba(0, 0, 0, .5), var(--glow); }
.ds-thumb {
  height: 120px; position: relative; overflow: hidden;
  background:
    radial-gradient(240px 120px at 50% 110%, rgba(37, 99, 235, .28), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(59, 130, 246, .07) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(59, 130, 246, .07) 23px 24px),
    var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.ds-thumb svg { width: 54px; height: 54px; stroke: rgba(147, 197, 253, .8); filter: drop-shadow(0 0 8px rgba(59, 130, 246, .6)); }
.ds-badge {
  position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700;
  background: rgba(5, 7, 15, .75); border: 1px solid var(--border-hi); color: #93c5fd;
  padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(6px);
}
.ds-play {
  position: absolute; right: 10px; bottom: 10px; font-size: 11px; color: var(--dim);
  display: flex; align-items: center; gap: 5px;
}
.ds-body { padding: 18px 18px 16px; flex: 1; display: flex; flex-direction: column; }
.ds-title { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.ds-desc {
  font-size: 12.8px; color: var(--muted); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ds-meta {
  display: flex; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--dim);
}
.ds-meta b { color: var(--muted); font-weight: 400; }

/* ===== Dataset detail ===== */
.detail-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.viewer-wrap {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
}
.viewer-wrap canvas { display: block; width: 100%; height: 100%; }
.viewer-hud {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: linear-gradient(0deg, rgba(5,7,15,.85), transparent);
}
.hud-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-hi);
  background: rgba(11, 16, 30, .8); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.hud-btn:hover { border-color: var(--primary); box-shadow: var(--glow); }
.hud-btn svg { width: 18px; height: 18px; fill: #fff; }
.hud-speed { display: flex; gap: 6px; }
.hud-speed button {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  background: transparent; border: 1px solid var(--border-hi); border-radius: 6px; padding: 5px 9px; min-height: 32px;
}
.hud-speed button.active { color: #fff; border-color: var(--primary); background: rgba(37, 99, 235, .25); }
.hud-time { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.viewer-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center; color: var(--muted); font-size: 13px;
  background: var(--surface);
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border-hi); border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.meta-panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.meta-panel h1 { font-size: 21px; font-weight: 900; margin-bottom: 8px; line-height: 1.45; }
.meta-cat { font-size: 12px; color: #93c5fd; margin-bottom: 14px; display: inline-block; border: 1px solid var(--border-hi); border-radius: 999px; padding: 3px 12px; }
.meta-desc { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.meta-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 18px; }
.meta-table th { text-align: left; color: var(--dim); font-weight: 500; padding: 8px 0; width: 42%; border-bottom: 1px solid var(--border); }
.meta-table td { font-family: var(--font-mono); color: var(--text); padding: 8px 0; border-bottom: 1px solid var(--border); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tag { font-size: 11.5px; color: var(--muted); background: rgba(148, 163, 184, .08); border-radius: 6px; padding: 4px 10px; }
.license-box {
  border: 1px solid rgba(59, 130, 246, .35); background: rgba(37, 99, 235, .08);
  border-radius: 10px; padding: 14px 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 20px;
}
.license-box b { color: #93c5fd; display: block; margin-bottom: 4px; font-size: 13px; }

/* ===== Waitlist form ===== */
.wl-card {
  max-width: 560px; margin: 0 auto; background: var(--surface-2);
  border: 1px solid var(--border-hi); border-radius: 18px; padding: 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; }
.form-row label .req { color: var(--accent); margin-left: 4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border-hi); border-radius: 10px;
  color: var(--text); font-family: var(--font-jp); font-size: 15px; padding: 12px 14px; min-height: 48px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); box-shadow: var(--glow); }
.form-msg { font-size: 13.5px; margin-top: 14px; }
.form-msg.ok { color: #4ade80; }
.form-msg.ng { color: #f87171; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 40px 0 34px; background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.footer small { color: var(--dim); font-size: 11.5px; display: block; line-height: 1.9; }
.footer .logo-mark { font-size: 14px; }
.preview-ribbon {
  background: linear-gradient(90deg, rgba(249, 115, 22, .16), rgba(37, 99, 235, .16));
  border-bottom: 1px solid var(--border); text-align: center;
  font-size: 12px; color: var(--muted); padding: 7px 12px;
}
.preview-ribbon b { color: var(--accent); }

::selection { background: rgba(37, 99, 235, .45); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
